Weird request du to comma in cloudinary url
On my server logs I got multiple incomming request as follow:
http://my-server.com/page/example/c_fill/q_auto/f_auto/example.jpg
On this page there is this cloudinary image that contain comma (",") on url
https://res.cloudinary.com/<ID>/image/upload/w_1000,h_1000,c_fill/q_auto/f_auto/example.jpg
Image tag is declare as follow
<img src="https://res.cloudinary.com/<ID>/image/upload/w_1000,h_1000,c_fill/q_auto/f_auto/example.jpg" srcset="https://res.cloudinary.com/<ID>/image/upload/w_1000,h_1000,c_fill/q_auto/f_auto/example.jpg 1x, https://res.cloudinary.com/<ID>/image/upload/w_2000,h_2000,c_fill/q_auto/f_auto/example.jpg 2x" />
So my assumption is that some browser doesn't support comma in url and then take only the last part of url, in this case "c_fill/q_auto/f_auto/example.jpg". That's why url is used as relative url and point to my server instead of cloudinary.
Also this can be an issue for Google:
Is there a way to manage tranformation without using comma ?
Encoding comma in url seems not perfect with cloudinary:
Answers
-
Hi there,
The two links that you shared for the google blog and the community one return 404s.
I have never seen this issue before but as a workaround you can try using a
/
(forward slash) instead of a comma. This method allows each transformation to act as its own "layer," preventing issues with commas.Here's how your image URL would look using chained transformations:
https://res.cloudinary.com/<ID>/image/upload/c_fill/q_auto/f_auto/w_1000/h_1000/example.jpg
In your
<img>
tag, the updated structure would look like this:<img src="https://res.cloudinary.com/<ID>/image/upload/c_fill/q_auto/f_auto/w_1000/h_1000/example.jpg" srcset="https://res.cloudinary.com/<ID>/image/upload/c_fill/q_auto/f_auto/w_1000/h_1000/example.jpg 1x, https://res.cloudinary.com/<ID>/image/upload/c_fill/q_auto/f_auto/w_2000/h_2000/example.jpg 2x" />
Let me know if this works.
Regards,
Akshay
Senior Developer Support Engineer
Cloudinary--
💡 Improve your site's performance by applying optimization features when delivering assets💬 Community Forums | 🧑💻 Discord Server
🧑🎓 Academy Training | 📖 Documentation | 📰 Blog0 -
Use "/" instead "," doesn't produce same result. So this is definitly not a solution.
Quick example, use following transformation :
c_fill,w_500,h_500:
Image will be crop to a square image of 500x500
c_fill/w_500/h_500:
c_fill here doesn't do anything. But the image is first resize to width: 500px and then to height 500px. So the image will keep this original ratio.
https://res.cloudinary.com/idemo/image/upload/c_fill/w_500/h_500/friends.jpg
https://res.cloudinary.com/idemo/image/upload/c_fill,w_500,h_500/friends.jpg0 -
Can you share the webpage where you are facing the issue with commas?
Senior Developer Support Engineer
Cloudinary--
💡 Improve your site's performance by applying optimization features when delivering assets💬 Community Forums | 🧑💻 Discord Server
🧑🎓 Academy Training | 📖 Documentation | 📰 Blog0 -
Is there any way to share a URL privately ?
0 -
Hey,
You can contact our support team via our help center****.
Regards,
AkshaySenior Developer Support Engineer
Cloudinary--
💡 Improve your site's performance by applying optimization features when delivering assets💬 Community Forums | 🧑💻 Discord Server
🧑🎓 Academy Training | 📖 Documentation | 📰 Blog0 -
Okay I will do that, but even if you have the website URL, the issue remains the same. With the website, you will see the image tag as I described in my initial message. I haven't found a way to reproduce the issue in a browser, but I can see the requests in the server logs.
0 -
I haven't come across this issue before, but I'd love to help you sort it out. We'll need to try and reproduce the problem to understand what's going on.
Regards,
Akshay
Senior Developer Support Engineer
Cloudinary--
💡 Improve your site's performance by applying optimization features when delivering assets💬 Community Forums | 🧑💻 Discord Server
🧑🎓 Academy Training | 📖 Documentation | 📰 Blog0