Option to use internal IPX service to process+save external images @ prerendered/generate #1273
luisjoserivera
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure even if this is currently possible. I did my research but no related results found.
Many times I've been in the situation where I
nuxt generate
a site or prerender some routes with content provided by a headless cms (eg: Storyblok) and I wished the images were processed by the internal IPX instead of the external provider image service.Most of the time I do
generate
or prerender a route is to drastically improve load times. Having the images already optimized and bundled in like the content would be even better.Making this work should be pretty similar to standard Static Images but with the additional step of copying the remote image during the prerendering steps of a route.
Flow:
Download/copy remote image
>Process with internal IPX
>Save it as a local asset
This could be set as a global config:
or as a prop for
<nuxt-img save-on-prerender provider="myextprovider" :src="https://myextprovider/cat.jpg" format="webp" />
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions