• Resolved devmimi

    (@devmimi)


    When I add images to a folder via FTP and perform a sync, the images that already exist in the folder (and have been synced previously) are duplicated. So after the second sync, I have 2 copies of images from the original sync and 1 copy of the newly added image in the media library and media library folders. Is this what should happen? I could not find documentation on this. Any help or pointing me in the right direction would be much appreciated. Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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

    Plugin Author AlanP57

    (@alanp57)

    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].

    Thread Starter devmimi

    (@devmimi)

    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

    Plugin Author AlanP57

    (@alanp57)

    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.

    Plugin Author AlanP57

    (@alanp57)

    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.

    Thread Starter devmimi

    (@devmimi)

    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!

    Plugin Author AlanP57

    (@alanp57)

    devmimi,

    We have released version 5.1.9 of Media Library Folders that addresses this issue of duplication of scaled images during syncing.

    Thread Starter devmimi

    (@devmimi)

    Thank you very much, Alan!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Duplicate images on subsequent sync’ is closed to new replies.