added new thumb size

This commit is contained in:
harrybomrah committed 2015-10-23 14:50:07 +08:00
1 parent 1628c0d3d2
commit 4d1ab7a226
3 files changed
+8

No files matched your search

+2
View File
@@ -67,6 +67,7 @@ class GalleriesController < ApplicationController
"link_to_show" => OrbitHelper.widget_more_url + "/" + a.album.to_param + "#" + a.id.to_s,
"alt_title" => alt_text,
"thumb-src" => a.file.thumb.url,
"thumb-large-src" => a.file.thumb_large.url,
"mobile-src" => a.file.mobile.url,
"theater-src" => a.file.theater.url
}
@@ -109,4 +110,5 @@ class GalleriesController < ApplicationController
render :json => {"data" => data}.to_json
end
end
+1
View File
@@ -1,3 +1,4 @@
require 'net/http'
class AlbumImage
include Mongoid::Document
include Mongoid::Timestamps
+5
View File
@@ -59,6 +59,11 @@ class GalleryUploader < CarrierWave::Uploader::Base
process :resize_to_fill => [200, 200]
end
version :thumb_large do
process :fix_exif_rotation
process :resize_to_fill => [600, 600]
end
version :theater do
process :fix_exif_rotation
process :resize_to_limit => [1920, 1080]