Skip to content

Use image_file_extension for picture variant rendering#3277

Merged
tvdeyen merged 1 commit intomainfrom
image_file_extension_picture_variant
Jun 23, 2025
Merged

Use image_file_extension for picture variant rendering#3277
tvdeyen merged 1 commit intomainfrom
image_file_extension_picture_variant

Conversation

@tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jun 23, 2025

What is this pull request for?

In ActiveStorage the image_file_format will be the file mime type and not the file extension.

Since Dragonfly uses the file extension as format in it's "magic column" we introduced the image_file_extension method in a previous commit, but now need to prepare the picture variant for the upcoming adapter.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@tvdeyen tvdeyen added this to the 8.0 milestone Jun 23, 2025
@tvdeyen tvdeyen requested a review from a team as a code owner June 23, 2025 15:11
In ActiveStorage the `image_file_format` will be the file
mime type and not the file extension. Since Dragonfly
uses the file extension as format in it's "magic column"
we introduced the `image_file_extension` method in a
previous commit, but now need to prepare the picture
variant for the upcoming adapter.
@tvdeyen tvdeyen force-pushed the image_file_extension_picture_variant branch from 16132fb to 8e6070f Compare June 23, 2025 15:14
@codecov
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.88%. Comparing base (35ee475) to head (8e6070f).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3277   +/-   ##
=======================================
  Coverage   96.88%   96.88%           
=======================================
  Files         267      267           
  Lines        6840     6840           
=======================================
  Hits         6627     6627           
  Misses        213      213           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. Nice find!

@tvdeyen tvdeyen merged commit 7f372f7 into main Jun 23, 2025
19 checks passed
@tvdeyen tvdeyen deleted the image_file_extension_picture_variant branch June 23, 2025 16:18
@alchemycms-bot alchemycms-bot bot mentioned this pull request Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants