Open ptdev opened 7 months ago
Improvement would be welcome 🙏
Hey,
I've submitted a 1 line PR with just the correct mapping for nuxt-image's default "cover" fit mode to the correct cloudinary fit mode (lfill).
As for the other missing cloudinary fit modes, since they're mapped to different names, I'll leave that for the nuxt team as I'm not sure how to name them 😕
Cheers
@ptdev How would you describe the issue with other fit modes? Would you give an example of what you're trying that isn't working?
Hey,
Thanks for the merge.
I didn't actually came across any issues with the missing modes.
It was just that when I was investigating the issue with the cover<->lfill mapping and looking at cloudinary's documentation, I noticed that cloudinary appears to have some more modes that are not on this module.
But looking at it closer now it seems it's just missing the "fill_pad" and auto modes which maybe don't even apply.
And their "fit" mode is now also unmapped after switching it to the correct "lfill" mode.
I honestly do not need any other modes so didn't get quite into all details, sorry.
Cheers. 👍
Hey,
The cloudinary provider is missing some fit modes that are supported by Cloudinary.
Specifically, I was looking to use the "lfill" mode, which as far as I can see, is the equivalent to the "cover" mode in nuxt-image.
But after looking into the source code, nuxt-image is apparently mapping the "cover" mode with cloudinary's "fit" mode which are not equivalent.
According to nuxt-image docs, the "cover" mode states:
While cloudinary's "fit" mode does not crop or clip images. From their docs regarding their "fit" mode, they state:
Also, doing a test with the same image using ipx and cloudinary using default values yields different images which further confirms the mappings for the fit modes are not totally correct.
Cheers!