image icon indicating copy to clipboard operation
image copied to clipboard

Cloudinary: Placeholder prop doesn't work as expected

Open PatrikBird opened this issue 1 year ago • 0 comments

Issue

The default (IPX) provider works as expected for NuxtImg the component, but there are several issues with placeholders when using cloudinary as the provider.

  1. The default (without any params) placeholder prop shown in the docs should respect the original image ratio, but does not, always requesting a 10x10 image.
<!-- Automatically generate a placeholder based on the original image -->
<nuxt-img src="/nuxt.png" placeholder />

Request URL: https://res.cloudinary.com/[...]w_10,h_10[...]/cld-sample-4.jpg

  1. Adding the placeholder prop to a NuxtPicture component does not work at all. No placeholder is being requested in the network tab. Edit: This is a general issue and unrelated to the Cloudinary provider. See #1160

Repro for both issues

https://stackblitz.com/edit/github-g1qxse?file=app.vue

FYI: Once the bug has been confirmed by a maintainer, I'll try to submit a PR.

PatrikBird avatar Jan 22 '24 09:01 PatrikBird