unpic
unpic copied to clipboard
Cloudinary SEO Suffix
Cloudinary has support for something called an SEO suffix. The idea is, you can customize the end of your image URL where the public ID would normally be, to add something SEO friendly.
Think instead of something like .../image/upload/oaisnd143, you can do .../images/oaisnd143/cool-image-with-stuff
I just added support for it in my little tool: https://github.com/colbyfayock/cloudinary-util/pull/19
Here's the updated regex:
https://github.com/colbyfayock/cloudinary-util/blob/main/packages/util/src/lib/cloudinary.ts#L2
HOWEVER
my regex requires a version in the URL so make parsing more predictible which I dont think yours is currently doing. Might be able to still get away with it, but regex isn't my thing, which is why I'm not putting in a PR instead of this 🙈
Relevant docs: https://cloudinary.com/documentation/advanced_url_delivery_options#seo_friendly_media_asset_urls