SEO implications of using f_auto vs always delivering the same format

yotango Member Posts: 5
edited August 17 in General

I'm a bit confused by the differing recommendations I'm seeing from different sources.

On the one hand, I see the value in being able to have a .jpg file extension in the URL, for example, while setting f_auto to ensure that users get the best format for their individual devices.

On the other hand, I've noticed that the Google Images docs for example recommend having the image file extension be the same as its extension in the URL. I've also seen various articles/blogs saying it's best to keep them the same if possible.

Our application is SEO-focused to a significant extent, so I'd like to get this right. My preference would be to specify a file extension in the URL as a fallback (that's how it works, right?) while using f_auto... does this practice have a downside in terms of SEO at all?

Thanks in advance.



  • DannyFromCloudinary
    DannyFromCloudinary Member, Cloudinary Staff Posts: 50

    Hey @yotango. Danny from Cloudinary's Support team here.

    Sadly, we don't support dynamically changing the delivery URL based on the file format chosen. e.g. If you have f_auto/yourimage.jpg and f_auto determines a webp is the best format to use, we don't have a means of changing that URL to f_auto/yourimage.webp.

    I can't speak to the SEO benefits/drawbacks to this approach, so it may be worth experimenting for yourself to see the impact, but we do allow you to simply omit the file extension. This way you avoid having .jpg in your URL and serving a different format. Plus, we can still use f_auto when omitting the file extension. So, as an example, is a jpg, but delivers an avif on Chrome on Desktop.

    I hope this helps. Please let me know if you have any questions.



  • yotango
    yotango Member Posts: 5

    Thank you @DannyFromCloudinary ... somewhat related question here. If I specify .webp as the extension in the URL, and I don't use f_auto, will Cloudinary automatically serve a fallback format to clients that can't use .webp?

  • DannyFromCloudinary
    DannyFromCloudinary Member, Cloudinary Staff Posts: 50

    Hi @yotango.

    Unfortunately not. If you were to set the file format manually, either by setting the extension or using f_someFormat, we would serve only the format requested. As such, if you were to specify webp and the browser doesn't support it, we would not show a fallback format.

    To get around this, there are a couple of things you could do that this article suggests.

    Option 1 would be to use an <object> with the data attribute set to your desired format, and an <img> with the src attribute set to your fallback. I've put together a working example in this jsfiddle which tries to load an avif. If you try this in Chrome, you're served an avif, but if you try it in Edge you get the jpg instead.

    Option 2 would be to use some javascript to set the src attribute of a failed img upon error

  • yotango
    yotango Member Posts: 5

    Thank you again @DannyFromCloudinary. I appreciate you going the extra mile to provide this information and the example usage.

  • Sdavid
    Sdavid Member Posts: 1

    Using a consistent image file extension in the URL that matches the actual image format can have SEO benefits, as it helps search engines understand the content of the image. This practice can improve image indexing and search visibility. However, utilizing tools like the "f_auto" parameter for automatic format optimization is still valuable for delivering the best quality image to users based on their devices. You can strike a balance by specifying the file extension in the URL as a fallback while leveraging automatic format optimization. This approach should not have a significant downside in terms of SEO if executed thoughtfully.