posts: remove cropped thumbnails.

This commit is contained in:
evazion
2021-12-16 15:54:26 -06:00
parent 379775d10d
commit 1c5786d20f
10 changed files with 7 additions and 62 deletions

View File

@@ -92,10 +92,6 @@ class MediaFile::Image < MediaFile
resize(w, h, size: :force, **options)
end
def crop(max_width, max_height, **options)
resize(max_width, max_height, crop: :attention, **options)
end
def preview_frame
if is_animated?
FFmpeg.new(file).smart_video_preview

View File

@@ -30,10 +30,6 @@ class MediaFile::Ugoira < MediaFile
preview_frame.preview(width, height, **options)
end
def crop(width, height)
preview_frame.crop(width, height)
end
def duration
(frame_delays.sum / 1000.0)
end

View File

@@ -15,10 +15,6 @@ class MediaFile::Video < MediaFile
preview_frame.preview(max_width, max_height, **options)
end
def crop(max_width, max_height)
preview_frame.crop(max_width, max_height)
end
private
def video