parent
cdb12bd39b
commit
c9ed272a4a
|
@ -8,7 +8,7 @@ module AccountAvatar
|
||||||
class_methods do
|
class_methods do
|
||||||
def avatar_styles(file)
|
def avatar_styles(file)
|
||||||
styles = { original: { geometry: '120x120#', file_geometry_parser: FastGeometryParser } }
|
styles = { original: { geometry: '120x120#', file_geometry_parser: FastGeometryParser } }
|
||||||
styles[:static] = { format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
|
styles[:static] = { geometry: '120x120#', format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
|
||||||
styles
|
styles
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ module AccountHeader
|
||||||
class_methods do
|
class_methods do
|
||||||
def header_styles(file)
|
def header_styles(file)
|
||||||
styles = { original: { geometry: '700x335#', file_geometry_parser: FastGeometryParser } }
|
styles = { original: { geometry: '700x335#', file_geometry_parser: FastGeometryParser } }
|
||||||
styles[:static] = { format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
|
styles[:static] = { geometry: '700x335#', format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
|
||||||
styles
|
styles
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
module Paperclip
|
module Paperclip
|
||||||
class LazyThumbnail < Paperclip::Thumbnail
|
class LazyThumbnail < Paperclip::Thumbnail
|
||||||
def make
|
def make
|
||||||
return @file unless needs_convert?
|
return File.open(@file.path) unless needs_convert?
|
||||||
Paperclip::Thumbnail.make(file, options, attachment)
|
Paperclip::Thumbnail.make(file, options, attachment)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue