Hi
This is not supposed to happen. It should only add the new image. To resolve this you could use the reset option of the plugin.
What names do the duplicate image get ?
How is the WordPress media setup?
You need to set it to “do not use year and month”
Which WordPress version and Php are you using?
I am not the developer, but a happy user of MLF
Peter
If I encountered this issue, I would create a new folder, that was working correctly when then files are added, and then move my files to the new folder.
This could be due to a configuration issue. Could you go to the Support page of Media Library Folders on your site, to the System Information page, highlight, copy and paste the information about your site and send it in an email to me at [email protected].
Hi Peter and Alan,
Thanks for your responses. I’m glad that it is not supposed to happen because other than this issue, I think MLF Pro would be what I am looking for.
I tested a few scenarios and it seems like the duplication only happens with images that are large in dimensions (for example 3000 x 2000), file size does not seem to trigger this though. For these large images, it looks like wordpress generates a filename-scaled.jpg version in addition to the other sizes. It is this scaled image that is synced to the media library, and duplicated with each sync. Other images that not scaled by wordpress are not duplicated.
Peter- the image names remain the same- filename-scaled.jpg, but the url appends a number to subsequent duplicates. I don’t have the library set to save in month/year folders.
Versions:
WordPress Version: 5.3.2
PHP Version: 5.6.40
Alan, I will email you the System Info.
Thanks for the help!
I have one remark regarding the php version.
That is a very old version, you better update to at least version 7.2. There are many plugins that do no longer support versions lower than 7.2
On my system I also noticed scaled images, but did not see duplicates until now
I do not see anything unusual about your site’s configuration so I am not able to explain why this issue is occurring.
Hi devmimi/alan
I can reproduce this problem by uploading a large image of 1.6 MB
I tested the behavior with the default Media library, which also creates a scaled image. As soon as a scaled image is present, and you sync the folder, it will show a duplicate image in Media Library Folder. However in the folder that contains the images no new image is created. So it appears that the folder contents on the server remain intact. It is just MLF showing duplicates.
It is standard behavior of WordPress to create scaled images if you upload a large image.
I contacted Alan about this reproduction. So this probably will help solving the problem quickly
Alan if you need help debugging than contact me please.
devmimi, Peter has found that large images have their files renamed with ‘-scaled’ added to the end of the file name and that is why the sync function assumes it is a new file. You may be able to turn off this renaming by WordPress by checking the ‘Disable large image scaling’ setting in Media Library Folders Settings until we update the Sync function to handle this issue.
Hi Peter/Alan,
What Peter described is what I see, only the -scaled named images get duplicated in MLF, not the server side. However, from my testing, I found that it was not the file size that triggered the scaling, but the image dimensions (I understand this is a wordpress behavior not MLF’s). It is strange though that the -scaled filename causes the sync to assume it is a new file because it seems like the initial file synced to MLF already had that exact -scaled filename.
Peter, I will be looking into updating to php 7.2.
Thanks!
devmimi,
We have released version 5.1.9 of Media Library Folders that addresses this issue of duplication of scaled images during syncing.
Thank you very much, Alan!