summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-14 15:10:33 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-14 15:10:33 +0200
commit810cddcb122462d62b31b03295e001ea5f0252ba (patch)
treeddbbd6f569f9c2c2196e1566ec4bb5881b43bd10 /app
parentcca0e57b21d506cd341b927984bcb68f0e461783 (diff)
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.
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/file_attachment.rb7
1 files changed, 4 insertions, 3 deletions
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
23 extend ActiveSupport::Concern 23 extend ActiveSupport::Concern
24 24
25 STYLES = { 25 STYLES = {
26 medium: { geometry: "300x300>", format: nil }, 26 medium: { geometry: "300x300>", format: nil },
27 thumb: { geometry: "100x100>", format: nil }, 27 thumb: { geometry: "100x100>", format: nil },
28 headline: { geometry: "460x250!", format: nil } 28 headline: { geometry: "460x250!", format: nil },
29 large: { geometry: "1600x1600>", format: nil }
29 }.freeze 30 }.freeze
30 31
31 IMAGE_CONTENT_TYPES = %w[image/jpeg image/gif image/png image/webp].freeze 32 IMAGE_CONTENT_TYPES = %w[image/jpeg image/gif image/png image/webp].freeze