While Uploading an image and then I change the alignment, the image was duplicated
Describe the bug It happened when I uploaded an image and then I changed the alignment before the image finished uploading.
To reproduce Steps to reproduce the behavior:
- Create New Post or Edit a Post
- Upload any image
- While uploading, change the alignment
- Go to Media Library and you'll see the image has been duplicated
Expected behavior The image should uploaded just 1.
Screenshots

Desktop (please complete the following information):
- OS: Windows 10 1909
- Browser Vivaldi
- Version 2.11
Additional context
- Wordpress 5.4
- PHP 7.3.14
Thanks for the screencast.
I've been unable to reproduce this problem. Changing alignment just changes the local display, and doesn't affect what data is sent to the server. Do you have other software that is manipulating images? I briefly see Smush there. Could you try again without these plugins running to see if they are responsible?
I was able to replicate this with no other plugins installed using the TwentyTwenty theme. I tried both with Jetpack and without as a test based on seeing Jetpack in the screenshot. It duplicates both when you drag & drop into the editor and if you use the Image block to upload an image adjusting the alignment as it finishes uploading.
- OS: MacOS 10.14.6
- Browser: Chrome 81.0.4044.122
- WordPress 5.4
- PHP 7.3.16
- No plugins installed
- Theme: TwentyTwenty
The issue should be fixed now, #30891.