scottyzen / woonuxt

Static e-commerce powered by WooCommerce & Nuxt
https://woonuxt.com
GNU General Public License v3.0
574 stars 140 forks source link

Path to images after Netlify deployment broken #144

Closed bluebird12 closed 3 months ago

bluebird12 commented 3 months ago

Hi and a big thank you for this great repo. I was really paying attention to the docs, but still I can’t get the images to work on the production site. At localhost I have no problems at all. It’s only related to the Nuxt Img Component.

Path to image deployed via Netlify: <img src="/.netlify/images?w=220&amp;h=248&amp;fm=webp&amp;fit=outside&amp;url=https:%2F%2Fshop.blackforest.rocks%2Fwp-content%2Fuploads%2F2023%2F07%2F1.png" onerror="this.setAttribute('data-error', 1)" width="220" height="248" alt="Trucker Cap" loading="eager" data-nuxt-img="" srcset="/.netlify/images?w=220&amp;h=248&amp;fm=webp&amp;fit=outside&amp;url=https:%2F%2Fshop.blackforest.rocks%2Fwp-content%2Fuploads%2F2023%2F07%2F1.png 1x, /.netlify/images?w=440&amp;h=496&amp;fm=webp&amp;fit=outside&amp;url=https:%2F%2Fshop.blackforest.rocks%2Fwp-content%2Fuploads%2F2023%2F07%2F1.png 2x" title="1" class="skeleton" data-error="1">

Path at localhost:3000: <img src="/_ipx/f_webp&amp;fit_outside&amp;s_220x248/https://shop.blackforest.rocks/wp-content/uploads/2023/07/1.png" onerror="this.setAttribute('data-error', 1)" width="220" height="248" alt="Trucker Cap" loading="eager" data-nuxt-img="" srcset="/_ipx/f_webp&amp;fit_outside&amp;s_220x248/https://shop.blackforest.rocks/wp-content/uploads/2023/07/1.png 1x, /_ipx/f_webp&amp;fit_outside&amp;s_440x496/https://shop.blackforest.rocks/wp-content/uploads/2023/07/1.png 2x" title="1" class="skeleton">

What am I missing? Can anyone point me to the right directions?
I’ve added some screenshots form the GraphQL settings. You can have a look here: https://shop.maller.dev/products The image on the detail pages work, because I replaced the Nuxt Image component with simple ing tags: https://shop.maller.dev/product/black-forest-analog-session-digital-download-mp3

Any help is highly appreciated!

bluebird12 commented 3 months ago

I figured it out. By adding this to the nuxt.config it works:

image: { provider: "ipx" }

scottyzen commented 3 months ago

Hi @bluebird12, I came across this myself recently. I have it fixed on a release branch the same way you have done here. Hoping to get the release out ASAP. Thanks