Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make optimised images depend on the configuration #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomhughes
Copy link

This ensures that images will be regenerated if any aspect of the image_optim configuration changes.

This ensures that images will be regenerated if any aspect
of the image_optim configuration changes.
Copy link
Owner

@toy toy left a comment

Choose a reason for hiding this comment

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

Great!
I think it will be better though to use only options for workers applied to specific image. For this it may be better to extract methods used in image_optim/cache for collecting options by image format. I'll try to do it this weekend, or PR welcome )

@@ -35,6 +40,7 @@ class Railtie < Rails::Railtie
{
:data => optimize_image_data(input[:data]),
:charset => nil, # no gzipped version with rails/sprockets#228
:dependencies => Set.new.add('image-optim-config'),
Copy link
Owner

Choose a reason for hiding this comment

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

I think using Set[] or to_set would be nicer

@toy toy force-pushed the main branch 3 times, most recently from a9aed93 to 60c9643 Compare December 27, 2024 20:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants