-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Skip image processing with eleventy-img - raw image? #133
Comments
https://www.11ty.dev/docs/plugins/image/#output-widths
That should skip processing the images. Another option is to write your own shortcode with fs.copyFile, but don't copy if There's also eleventy passthrough copy, but I don't recall if it copies on every build. Also, maybe we can check internally if the output file size is larger, and print a warning or not transform the file if the dimensions don't change. Assuming this isn't a known bug, I encourage you to report it on the sharp repo. |
Hmm, I think this would request be better invested in incremental build support, which already works with passthroughCopy https://www.11ty.dev/docs/usage/incremental/#passthrough-copy Note the pretty hefty limitation right now that incremental builds require a full build on cold start https://www.11ty.dev/docs/usage/incremental/#cold-start 11ty/eleventy#984 Given that information, I will still put this on the enhancement queue for upvotes but (imo) the muscle would be better spent on improving incremental build support. |
|
Related to #212 |
I have some images on the blog posts that are on the .md file on the layout front matter as images to use for sharing in social media and as a thumbnail.
Those images still need to be moved to the
_site
folder and I would like to move them only once and only if they change.That's why I considered using
eleventy-img
for them instead of just usingfs.copyFile
.I want to make use of the
eleventy-img
cache for this but i don't wanteleventy-img
to process them at all.They are in png and for some reason
eleventy-img
ends up creating a bigger file.Source file 5.9Kb and output file is 7.7Kb.
Both png.
Is there a way to tell
eleventy-img
we want to skip any kind of image processing?I tried using
sharOptions
to pass theraw
option, but it doesn't seem to do the trick:The text was updated successfully, but these errors were encountered: