From 810cddcb122462d62b31b03295e001ea5f0252ba Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 14 Jul 2026 15:10:33 +0200 Subject: Add a :large FileAttachment style for full-width inline body images Sized generously (1600x1600>) rather than against today's cramped 490px content column specifically -- shrinking an oversized source to fit a narrow container is free and looks fine; a source too small for a future, wider redesign has no fix short of re-uploading every image. Purely additive: nothing reads :large yet, and generate_variants already loops over the whole STYLES hash generically, so no other code needed to change for new uploads to start getting it. Test suite's own hardcoded style lists updated in the same commit so they don't quietly drift out of sync with what the app actually defines. --- app/models/concerns/file_attachment.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/models/concerns/file_attachment.rb b/app/models/concerns/file_attachment.rb index 0e99fa2..86e5c68 100644 --- a/app/models/concerns/file_attachment.rb +++ b/app/models/concerns/file_attachment.rb @@ -23,9 +23,10 @@ module FileAttachment extend ActiveSupport::Concern STYLES = { - medium: { geometry: "300x300>", format: nil }, - thumb: { geometry: "100x100>", format: nil }, - headline: { geometry: "460x250!", format: nil } + medium: { geometry: "300x300>", format: nil }, + thumb: { geometry: "100x100>", format: nil }, + headline: { geometry: "460x250!", format: nil }, + large: { geometry: "1600x1600>", format: nil } }.freeze IMAGE_CONTENT_TYPES = %w[image/jpeg image/gif image/png image/webp].freeze -- cgit v1.3