Skip to content

Modern Image Formats: The alternate mime type images didn't add original image extension in image name #1661

@mukeshpanchal27

Description

@mukeshpanchal27

Bug Description

While i doing smoke testing for plugin release i found that the uploaded image didn't add original image extension( -jpeg or -jpg ) in the full and sub-sizes image. For sub-size previously i reported #1560. After 6.7 the full size image also didn't get the image extension.

In #444 we added the original image's extension to the WebP file name to ensure it is unique but after 6.7 the original issue reintroduce.

Image.jpeg

<img
    fetchpriority="high"
    decoding="async"
    width="600"
    height="400"
    src="https://closebat.s1-tastewp.com/wp-content/uploads/2024/11/image.webp"
    alt=""
    class="wp-image-15"
    srcset="
        https://closebat.s1-tastewp.com/wp-content/uploads/2024/11/image.webp 600w,
        https://closebat.s1-tastewp.com/wp-content/uploads/2024/11/image-300x200.webp 300w
    "
    sizes="(max-width: 600px) 100vw, 600px"
>

Image.jpg

<img
    decoding="async"
    width="600"
    height="400"
    src="https://closebat.s1-tastewp.com/wp-content/uploads/2024/11/image-1.webp"
    alt=""
    class="wp-image-16"
    srcset="
        https://closebat.s1-tastewp.com/wp-content/uploads/2024/11/image-1.webp 600w,
        https://closebat.s1-tastewp.com/wp-content/uploads/2024/11/image-1-300x200.webp 300w
    "
    sizes="(max-width: 600px) 100vw, 600px"
>

Steps to reproduce

  1. Install and activate Modern Image Formats plugin.
  2. Upload two same name image. image.jpeg and image.jpg
  3. See frontend.

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Plugin] Modern Image FormatsIssues for the Modern Image Formats plugin (formerly WebP Uploads)[Type] BugAn existing feature is broken

    Type

    Projects

    Status

    Not Started/Backlog 📆

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions