Processed Images Missing?

  • I logged into one of my larger Perch websites and about 200 of the most recent assets (images) are missing thumbnails + resized versions of the original image. All of original image files are accessible in the perch/resources folder, but the resized (example: filename-w500.jpg) and thumbnail images now show this:



    It recognizes that the image file exists, but the actual image is now missing.

    I re-uploaded the original image again and it processed the image just fine, creating a new thumbnail and a resized version.


    Is there a way I can re-process and replace these files without manually going to each region and resaving the newly uploaded image? Also, any advice or ideas on how this could've happened in the first place so I can avoid this issue again?

  • drewm

    Approved the thread.
  • If these image variations used to exist and now do not, it might be worth looking into what happened. Does the resources table still have a record of the missing variations?


    If you know a Perch asset with ID 37 has missing variations, you can query the database to check if Perch has a record of the variations - assuming your PERCH_DB_PREFIX is perch3_:


    SQL
    1. SELECT * FROM `perch3_resources` WHERE `resourceParentID` = 37




    There are 2 types of asset variations:

    1. Thumbnails: these are generated by default
    2. Other variations you specify in templates e.g.:
    HTML
    1. <perch:content id="image" type="image" width="400" crop>



    For (1), it is technically possible to write a script to regenerate those. I recently had a problem with S3 thumbnails so I wrote a scheduled task to periodically fetch any assets with no thumbnails and regenerate them.


    For (2), I don't have a solution for this. I don't think republishing all pages would regenerate these.

  • Thank you for your response, this is helpful information.


    The resource table does still have record of the variations. I believe I'm out of luck on this one and will have to manually reupload the images to get the correct variations again.