Support » Plugin: Image Regenerate & Select Crop » Removing “scaled” meta after file deletion

  • I have an image for which there is a meta entry for image-scaled.jpg, but the image file is missing.

    Since this isn’t a registered thumbnail size, there’s no way to delete this meta entry using the image details popup. Clicking on the red trash bin does nothing, and this size doesn’t appear anywhere else.

    I’m currently running the global cleanup, but that takes a very long time, and I wonder if it will catch this situation, so if at all possible, the details popup should provide a way of deleting a “scaled” image.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Gal Baras

    (@galbaras)

    So the cleanup job ran to completion and did NOT remove the meta data for -scaled 🙁

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi,

    I am not sure how to replicate the initial issue. Can you share the whole meta object you have in the database for that image?

    Regards,
    Iulia

    Thread Starter Gal Baras

    (@galbaras)

    I think that if you upload an image larger than 2560×2560, WordPress will automatically create a “-scaled” image and use it as the main file for embedding.

    Here’s the attachment metadata for an image:

    array (
    ‘width’ => 1280,
    ‘height’ => 1920,
    ‘file’ => ‘2022/06/PO962-Kendall-BLACK-1-scaled.jpg’,
    ‘filesize’ => 490101,
    ‘sizes’ =>
    array (
    ‘thumbnail’ =>
    array (
    ‘file’ => ‘PO962-Kendall-BLACK-1-150×150.jpg’,
    ‘width’ => 150,
    ‘height’ => 150,
    ‘mime-type’ => ‘image/jpeg’,
    ‘filesize’ => 7564,
    ),
    ‘medium’ =>
    array (
    ‘file’ => ‘PO962-Kendall-BLACK-1-615×923.jpg’,
    ‘width’ => 615,
    ‘height’ => 923,
    ‘mime-type’ => ‘image/jpeg’,
    ‘filesize’ => 121106,
    ),
    ‘medium_large’ =>
    array (
    ‘file’ => ‘PO962-Kendall-BLACK-1-768×1152.jpg’,
    ‘width’ => 768,
    ‘height’ => 1152,
    ‘mime-type’ => ‘image/jpeg’,
    ‘filesize’ => 177407,
    ),
    ‘large’ =>
    array (
    ‘file’ => ‘PO962-Kendall-BLACK-1-900×1350.jpg’,
    ‘width’ => 900,
    ‘height’ => 1350,
    ‘mime-type’ => ‘image/jpeg’,
    ‘filesize’ => 236725,
    ),
    ‘woocommerce_thumbnail’ =>
    array (
    ‘file’ => ‘PO962-Kendall-BLACK-1-500×750.jpg’,
    ‘width’ => 500,
    ‘height’ => 750,
    ‘mime-type’ => ‘image/jpeg’,
    ‘filesize’ => 85567,
    ),
    ‘woocommerce_single’ =>
    array (
    ‘file’ => ‘PO962-Kendall-BLACK-1-1000×1500.jpg’,
    ‘width’ => 1000,
    ‘height’ => 1500,
    ‘mime-type’ => ‘image/jpeg’,
    ‘filesize’ => 280655,
    ),
    ‘woocommerce_gallery_thumbnail’ =>
    array (
    ‘file’ => ‘PO962-Kendall-BLACK-1-138×207.jpg’,
    ‘width’ => 138,
    ‘height’ => 207,
    ‘mime-type’ => ‘image/jpeg’,
    ‘filesize’ => 9933,
    ),
    ),
    ‘image_meta’ =>
    array (
    ‘aperture’ => ‘0’,
    ‘credit’ => ”,
    ‘camera’ => ”,
    ‘caption’ => ”,
    ‘created_timestamp’ => ‘0’,
    ‘copyright’ => ”,
    ‘focal_length’ => ‘0’,
    ‘iso’ => ‘0’,
    ‘shutter_speed’ => ‘0’,
    ‘title’ => ”,
    ‘orientation’ => ‘0’,
    ‘keywords’ =>
    array (
    ),
    ),
    ‘original_image’ => ‘PO962-Kendall-BLACK-1.jpg’,
    )

    I wanted to use the scaled image, so I renamed it to replace the original, but then, it went missing, and there’s no way to make the original the full size image again in bulk.

    If I recall correctly, this happened even when I used a plugin to replace the image. WordPress remembers the scaled image somewhere and keeps trying to use it.

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    Thanks for the details, I will try to replicate the issue follow in the same steps. Could you share the JSON to replicate your settings?

    When you say “so I renamed it to replace the original” what do you mean? Are you renaming the file using a tool, or are you doing that on the server?

    Thread Starter Gal Baras

    (@galbaras)

    I’m realising that this is probably a unique situation. Don’t worry about it.

    Thread Starter Gal Baras

    (@galbaras)

    I’ve noticed this problem on another site, and now I think it may (also) be a compatibility issue with the Media File Renamer plugin.

    • This reply was modified 1 year, 4 months ago by Gal Baras.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Removing “scaled” meta after file deletion’ is closed to new replies.