Option to use internal IPX service to process+save external images @ prerendered/generate #1273
luisjoserivera
started this conversation in
Ideas
Replies: 2 comments
-
|
@danielroe is it something already doable ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This is already doable, yes. You should just have to state the domain of the external images in the Two caveats though:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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 generatea 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
generateor 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 assetThis 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