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

Pass urlPath to imageOptimization even if disabled #68

Open
codysaylor opened this issue Jan 31, 2021 · 2 comments
Open

Pass urlPath to imageOptimization even if disabled #68

codysaylor opened this issue Jan 31, 2021 · 2 comments

Comments

@codysaylor
Copy link

codysaylor commented Jan 31, 2021

The imageOptimization takes a very long time for only a few images and I'd only like it to run on production, but I still need images to be prefixed with urlPath when they are not optimized and are given eleventyConfig.addPassthroughCopy if on development. This way, when the plugin doesn't optimize the images, their reference source still works in the rendered html files.

@codysaylor codysaylor changed the title Pass urlPath to Pass urlPath to imageOptimization even if disabled Jan 31, 2021
@sebastianbenz
Copy link
Collaborator

Just to be sure I understand: images should be resized and srcsets generated, but not compressed?

@codysaylor
Copy link
Author

@sebastianbenz I'm not sure which part of the image processing slows it down so much. If "imageOptimization" only does the compression, then yes, that's all I'm requesting be toggleable. That process seems to be what is slowing down my builds dramatically. Perhaps we could pass in a disabled property in the config for imageOptimization, which would turn that functionality off but still be able to prefix the image paths with urlPath. If it were faster, it would be no problem, but in development I need to keep the urlPath but disable the slow image optimization.

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

No branches or pull requests

2 participants