Nuxt Image does not optimize my images
hey guys, does anyone know why nuxt image doesn't optimize my images?
I added the module as per documentation and this is my config:
getStrapiMedia
returns the full url of the requested media (basically it appends the correct url in the value given if necessary.
during the nuxt generate --prerender
process there aren't any images been generated in the .output
folder (optimized images I mean) and the images showing at the user are the same as they are in the CMS. Most images are .svg
and they can be 2 MB
worth of size which I do not want that.
Any clues why they don't get optimized during the generate process?8 Replies
that's not yet supported (downloading images from a cms during generation)
@danielroe thank you! does that mean nuxt image only optimizes images that are located in the public folder?
yes. it's responsible for the other providers to handle generating a url that is optimised via the url
so there is no way to optimize images retrieved from Strapi? they must be already optimized when uploaded there?
Let Strapi handle the optimization. Check out the market, lots of plugins.
yeah I thought the
nuxt-image
plugin would handle thatWe have kind of opposite problem, we use our customer provider to generate correct urls for images, however during SSG, images are beind donwloaded and it killed external image provider. How can we ensure that it doesn't try to download images during SSG?
Are your image URLs local? e.g.
/some/url
rather than https://cdn.myapi.com/some/url
?