Double file ending (.jpg.jpg) breaks WebP generated filenames

Created on 17 March 2022, over 2 years ago
Updated 21 March 2024, 3 months ago

Problem/Motivation

Images that have double file ending such as .jpg.jpg cause images to stop loading on the website.

Steps to reproduce:

  1. Upload a file named example.jpg.jpg.
  2. Webp derivative filename is shown as example.jpg.webp.jpg.webp.
  3. But the file that is actually created is example.jpg.jpg.webp.

This bug was initially proposed as a filename cleanup in filename_transliteration: #3269385: Double file ending but it was determined to be out of scope there.

Proposed Resolution

The workaround (until the bug is fixed in imageapi_optimize_webp module) is to install Extension Sanitization .

The proper fix would be to either incorporate the features of extension_sanitization into this module, or otherwise improve duplicate filename extension handling.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇸🇮Slovenia useernamee Ljubljana

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada mgifford Ottawa, Ontario

    Sorry, I don't know that this should be tagged with sustainability given that this is a bug in an edge case. Should be fixed, but I'm changing my mind.

Production build 0.69.0 2024