Different files with the same name in the same folder but with a different extension are overwritten in the conversion.

Created on 15 May 2024, 6 months ago

Problem/Motivation

Files with the same name in the same folder but with different extensions are overwritten during conversion. For example, if you have image.png, image.jpg, and image.jpeg and convert all the images to .jpg, you will end up with only one image.jpg. This results in three different file IDs (fid) pointing to the same URI, with the other two files being deleted.

Steps to reproduce

- Go to the config page: /admin/config/media/image-resizer
- Select "jpg" in Enforce image type
- Upload different images with the same name but different extension, example (image.jpg and image.png) in the same year-month
directory.
- Process the queue and verify that now you only have image.jpg and both images are pointing to only one and that the other has been
deleted.

Proposed resolution

Use getDestinationFilename from FileSystem

Remaining tasks

Provide a MR

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇪🇸Spain isaacrc

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024