Problem/Motivation

After re-upload different image with same name "image.jpg" (not important extension). Preview not showing valid image (showing first image)

Steps to reproduce

Need two image with same name with same extension
folder_1/image.jpg (img_1 short name to explain)
folder_2/image.jpg (img_2)

1) Create new node
2) Upload img_1 first time, preview is showing valid
3) Remove img_1, and after this upload img_2, preview is showing of first img_1.

But after save is valid image is showing in edit node.
Notes: After upload second image preview name not match fileUri, but it match preview file name.
Example: After upload image name is: image_0.jpg, re-upload image.jpg (img_2) name is image_1 but in preview is used image_0.jpg.

Images is attached:
1) First image is img_1 with same name
2) Re upload other image with same name, we see that preview is showing old
3) After save, back to edit, preview is valid and filename is changed

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Utilvideo created an issue. See original summary.

pavelculacov’s picture

Issue summary: View changes
StatusFileSize
new297.93 KB
new399.98 KB
new400.81 KB
larowlan’s picture

Priority: Normal » Minor

Thanks for reporting

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.