Title: Unnecessary thumbnails and array offset warning
Last modified: October 6, 2025

---

# Unnecessary thumbnails and array offset warning

 *  [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [8 months, 1 week ago](https://wordpress.org/support/topic/unnecessary-thumbnails-and-array-offset-warning/)
 * I have some strange behaviour on my site:
    1. Getting the message `PHP Warning: Trying to access array offset on false in 
       ROOT/wp-content/plugins/image-regenerate-select-crop/image-regenerate-select-
       crop.php` on lines 1967 & 2416
    2. When I run **Cleanup unused files and keep currently registered sizes files**,
       I get an error that image **2015/04/** cannot have a thumbnail removed, because
       it’s pointing at the original file. Of course, this isn’t a file name
    3. When regenerating 100x100px originals, I get all the sizes (150x150px thumbnail,
       max width 300px medium and max width 660px large), all with the original file
       name. I’ve just run complete regeneration for all these sizes, and all the thumbnails
       were created for smaller originals
 * How do I debug this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funnecessary-thumbnails-and-array-offset-warning%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [4 months, 1 week ago](https://wordpress.org/support/topic/unnecessary-thumbnails-and-array-offset-warning/#post-18805018)
 * Hi, Gal
   I think you can check in the settings if you have the `attempt to upscale
   when generating only perfect fit sizes` activated. That would make it so that
   images that have a small original to still produce sub-sizes that are bigger.
   Regarding the warning, I think these are fixes in 8.1.3 version. Please upgrade
   and test.Best regards,Iulia
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [4 months ago](https://wordpress.org/support/topic/unnecessary-thumbnails-and-array-offset-warning/#post-18813282)
 * Hi Iulia,
 * Thank you for the update.
 * I do not have `attempt to upscale when generating only perfect fit sizes` activated.
   Could this be a leftover from the past (although I don’t recall ever enabling
   this option)?
 * Cheers,
   Gal
    -  This reply was modified 4 months ago by [Gal Baras](https://wordpress.org/support/users/galbaras/).
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [4 months ago](https://wordpress.org/support/topic/unnecessary-thumbnails-and-array-offset-warning/#post-18817241)
 * Still getting this when trying to delete files for unregistered sizes:
 * ![](https://i0.wp.com/i.imgur.com/FX1QllJ.jpeg?ssl=1)
 * This also doesn’t clean up all the files.
 * Then, there’s a 132x86px image with sizes that are larger. As you can see, they
   use the original file, but the thumbnail record are still created. I’ve removed
   them and regenerated thumbnails for the image, and they came back.
 * ![](https://i0.wp.com/i.imgur.com/AcGnKqh.jpeg?ssl=1)
    -  This reply was modified 4 months ago by [Gal Baras](https://wordpress.org/support/users/galbaras/).
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [4 months ago](https://wordpress.org/support/topic/unnecessary-thumbnails-and-array-offset-warning/#post-18817455)
 * Hi Gal,
   Regarding the cleanup screen, where you see the folders and “could not
   be deleted”, it seems likely that the mapping was done when the plugin code was
   not checking properly the files, but I think I fixed that in the previous release.
   I will take a look again to see if I missed something, or if that seems like 
   leftover metadata from the previous run.
 * For the second part, with the sub-size meta that is mapping the original, are
   you saying that when you delete the medium in the modal and you regenerate all
   sub-sizes for that attachment (from the individual attachment regenerate button)
   you still get this medium meta attached in the database?
   Could you send me your
   settings JSON so I can try to replicate using the same setup? Regards,Iulia
    -  This reply was modified 4 months ago by [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/).
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [3 months ago](https://wordpress.org/support/topic/unnecessary-thumbnails-and-array-offset-warning/#post-18847422)
 * Hi Iulia,
 * Raw cleanup seems to remove more than it did before, but I’m still getting the
   same directories listed as not being deleted, and regenerating thumbnails still
   adds the medium and large sizes with links to the original when the original 
   is smaller.
 *     ```wp-block-code
       a:25:{s:14:"sirsc_settings";a:11:{s:7:"exclude";a:0:{}s:11:"unavailable";a:0:{}s:17:"force_original_to";s:0:"";s:22:"complete_global_ignore";a:5:{i:0;s:12:"medium_large";i:1;s:9:"1536x1536";i:2;s:9:"2048x2048";i:3;s:14:"project-single";i:4;s:22:"easy_testimonial_thumb";}s:12:"placeholders";a:0:{}s:12:"default_crop";a:3:{s:9:"thumbnail";s:2:"cc";s:14:"project-single";s:2:"cc";s:22:"easy_testimonial_thumb";s:2:"cc";}s:15:"default_quality";a:6:{s:9:"thumbnail";s:2:"82";s:6:"medium";s:2:"82";s:12:"medium_large";s:2:"82";s:5:"large";s:2:"82";s:14:"project-single";s:2:"82";s:22:"easy_testimonial_thumb";s:2:"82";}s:14:"enable_perfect";b:0;s:19:"disable_woo_thregen";b:0;s:18:"sync_settings_ewww";b:1;s:20:"listing_tiny_buttons";b:1;}s:23:"sirsc_user_custom_rules";s:0:"";s:30:"sirsc_user_custom_rules_usable";s:0:"";s:28:"sirsc_use_custom_image_sizes";a:2:{s:5:"sizes";a:0:{}s:6:"number";i:0;}s:25:"sirsc_override_large_size";s:1:"0";s:26:"sirsc_override_medium_size";s:1:"0";s:19:"sirsc_settings_post";s:0:"";s:19:"sirsc_settings_page";s:0:"";s:25:"sirsc_settings_templatera";s:0:"";s:22:"sirsc_settings_iwp_log";s:0:"";s:26:"sirsc_settings_testimonial";s:0:"";s:31:"sirsc_settings_flamingo_contact";s:0:"";s:31:"sirsc_settings_flamingo_inbound";s:0:"";s:34:"sirsc_settings_wpb_gutenberg_param";s:0:"";s:27:"sirsc_settings_vc_grid_item";s:0:"";s:30:"sirsc_settings_itsec-dashboard";s:0:"";s:30:"sirsc_settings_itsec-dash-card";s:0:"";s:26:"sirsc_settings_jp_mem_plan";s:0:"";s:33:"sirsc_settings_memberships_coupon";s:0:"";s:31:"sirsc_settings_memberships_gift";s:0:"";s:27:"sirsc_settings_jp_pay_order";s:0:"";s:29:"sirsc_settings_jp_pay_product";s:0:"";s:32:"sirsc_settings_rm_content_editor";s:0:"";s:31:"sirsc_settings_rank_math_schema";s:0:"";s:28:"sirsc_settings_vc4_templates";s:0:"";}
       ```
   
 * Thanks again,
   Gal

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funnecessary-thumbnails-and-array-offset-warning%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/image-regenerate-select-crop/assets/icon-128x128.gif?rev
   =2371819)
 * [Image Regenerate & Select Crop](https://wordpress.org/plugins/image-regenerate-select-crop/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-regenerate-select-crop/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-regenerate-select-crop/)
 * [Active Topics](https://wordpress.org/support/plugin/image-regenerate-select-crop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-regenerate-select-crop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-regenerate-select-crop/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * Last activity: [3 months ago](https://wordpress.org/support/topic/unnecessary-thumbnails-and-array-offset-warning/#post-18847422)
 * Status: not resolved