Skip to content
New issue

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

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

Already on GitHub? Sign in 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

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