You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the returned Image filename is hashed 6299b188-320.jpeg. So the preload is incorrect.
And there are multiple versions 6299b188-800.jpeg, 6299b188-1200.jpeg etc and types 6299b188-320.webp etc. Which do you use?
What are my options here:
I can use custom filenames in the Image shortcode but how do I extract and use the correct filename for use in the front matter?
Do I need to create a plugin that, given the same source input, just returns image metadata (transformed filename) as eleventy image? And then call that plugin with something like:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using eleventy image to create a
srcset
but I want to preload my hero image.In my template I use:
and in
_page_layout.njk
I have:But the returned Image filename is hashed
6299b188-320.jpeg
. So the preload is incorrect.And there are multiple versions
6299b188-800.jpeg
,6299b188-1200.jpeg
etc and types6299b188-320.webp
etc. Which do you use?What are my options here:
Image
shortcode but how do I extract and use the correct filename for use in the front matter?Is there another (easier) way to do this?
Beta Was this translation helpful? Give feedback.
All reactions