Site logo

[Resolved] Thumbnails for -scaled images are randomly missing from the server

Home Forums Support [Resolved] Thumbnails for -scaled images are randomly missing from the server

Home Forums Support Thumbnails for -scaled images are randomly missing from the server

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2430094
    James

    Hello,

    We have a number of images that exceed the big_image_size_threshold and so have been resized by WordPress and have “-scaled” appended to the image file name. (https://make.wordpress.org/core/2019/10/09/introducing-handling-of-big-images-in-wordpress-5-3/)

    I can’t understand why, but for some reason the thumbnails and the original file are today missing when yesterday they were physically on the server. This first happened on 8 Nov 22 and again today (23 nov 22). I worked around this last time by duplicating the scaled images, removing the “-scaled” text from the copy and using wpcli to regenerate the thumbnails. Given that this solution lasted for only 15 days I’m now trying to understand why this is happening. It does seem to correlate with the release of GeneratePress 3.2.2 and GeneratePress 3.2.3.

    I have included some samples in the private information section to help with debugging. Really hope we can work together to isolate this issue.

    Fingers crossed!

    #2430108
    Ying
    Staff
    Customer Support

    Hi there,

    GP doesn’t have control over the image files, it’s 100% controlled by WP.

    Do you have any plugins that do image optimizations?

    #2433390
    James

    I’m not aware of any active plugins that do image optimisations, as I said before updating to GeneratePress 3.2.2 and GeneratePress 3.2.3 seems to be a related trigger for the ‘-scaled’ images to vanish.

    I’ve managed to regenerate the thumbnails using the ‘wp media regenerate’ command in wpcli but am still very keen to understand why this has happened twice – are you able to escalate this?

    #2433449
    David
    Staff
    Customer Support

    Hi there,

    i have asked amongst my colleagues and none of them has experienced this kind issue before.
    We can categorically state that it is not a theme or GP Premium related issue.
    None of our code interferes with the way WordPress saves or generates media attachments.

    It would either be a database issue, and perhaps your host can check the logs to see what caused them to be deleted.
    Or a plugin issue, looking at your plugin list, i see: Enable Media Replace – which reading its description is a plugin that does write to the media library, so maybe its support could answer whether this is a risk.

    #2433633
    James

    Thank you David for the rapid response and for helping to rule out GeneratePress.

    I disabled Enable Media Replace (EMR) after the first incident on 8 Nov 22 thinking the same as you that it writes to the media library (it should have shown as inactive in the list I shared privately). That said there was an update to EMR from version 4.0.0 to 4.0.1 which I installed on on the same day as GeneratePress 3.2.3 … but it was updated in a deactivated state so I had ruled it out in my mind.

    In any case I will now delete EMR completely and wait and see if the issue reoccurs.

    I understand that general debugging is outside the scope of GP support but when you say ‘a database issue’ are you able to give any more of a steer on keywords that I should be Googling for to continue debugging this. I have already spoken with my host (Kinsta) and they are unwilling to help debug this because they don’t believe infrastructure is the cause.

    Thanks again!

    #2433885
    David
    Staff
    Customer Support

    Kinsta should be able scan the database to check if any issues. It may not be a conclusive – here is your problem – but it may show up some things that need repairing.

    Otherwise you would need to monitor database activity looking for post_type = 'attachment' entries to see what is writing to that table. Again its not conclusive but may point to whats changing.

    There are some plugins that monitor database activity like this one:

    https://en-gb.wordpress.org/plugins/aryo-activity-log/

    #2464084
    James

    Working with Kinsta we haven’t found any issues with the database. In the end I have manually renamed the image files to remove ‘-scaled’ from the URL and search-replace the database references. Seems to be working so far, hopefully this fix is permanent.

    Thank you for confirming that it is not a theme or GP Premium related issue, helpful to narrow this down!

    (For reference, this stack exchange explains why ‘-scaled’ is added: https://wordpress.stackexchange.com/questions/353845/how-to-disable-the-suffix-scaled-which-is-being-added-at-the-end-of-each-uplo)

    #2464149
    David
    Staff
    Customer Support

    Glad to hear you’re making some progress with the issue. Hopefully the search and replace will work and its permanent !

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.