• Resolved Sakshi Tyagi

    (@sakshityagi343)


    Hi,

    I’m using the Converter for Media plugin, and while it converts images to .webp on the frontend, I’m facing an issue with the WordPress Post APIs. The API returns image URLs with the original extensions (e.g., .jpg or .png), but when downloading, the files are served as .webp. This is causing failures in image displaying in connected applications since the extensions don’t match.

    Can you recommended a solution to address this issue?

    Thanks in advance for your help!

Viewing 1 replies (of 1 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @sakshityagi343,

    Thank you for your message.

    The plugin does not change URLs to images, so when looking at the source of the website, you will see the URLs for the default images all the time. The plugin creates redirections to output files in WebP and AVIF format, changing the MIME type of these images, but without changing the URL.

    Below I have attached the tutorial describing how to test the plugin:
    https://mattplugins.com/docs/how-to-test-converter-for-media-plugin

    This is causing failures in image displaying in connected applications since the extensions don’t match.

    No tool should look at the file extension, because it’s a security vulnerability. Virtually all tools look at the Content Type returned by the file, which is why we haven’t had the same issues you mentioned.

    Additionally, changing URLs creates a lot of problems. It is not possible to guarantee that all URLs will be changed, because they are saved in many places in the database by various plugins and WordPress itself. Additionally, changing URLs has a negative impact on SEO for images that are already indexed by Google. For these reasons, among others, we do not change URLs, thus eliminating potential problems with caching plugins that save the page in the HTML file.

    Best,
    Mateusz

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.