-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloudinary SEO Suffix #17
Comments
Oh and if it helps, heres a regex101 that helped me visualize: https://regex101.com/r/TqK3do/1 |
Thank you for sharing the regex code, it was not working for dynamic SEO suffix due to the fact, the deliveryType group was restrained with default options, in cloudinary page, there is an option to mainuplate the URL by changing from 'image' to 'images' and removing 'upload/version'/ and add a suffix for seo. Example: https://res.cloudinary.com/cloudname/image/upload/v1698107224/location_jr0gqg.jpg to https://res.cloudinary.com/cloudname/location_jr0gqg.jpg to https://res.cloudinary.com/cloudname/images/location_jr0gqg/Anyname.jpg Anyways, I have modified the code and added
I would hope if the developer @ascorbic update the repo and fix the code Many thanks |
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: cloudinary-community/cloudinary-util#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
The text was updated successfully, but these errors were encountered: