Title: Undefined array key &#8220;mime-type&#8221; &#8211; php 8 issue?
Last modified: January 14, 2022

---

# Undefined array key “mime-type” – php 8 issue?

 *  Resolved [giggles420](https://wordpress.org/support/users/gigglesslut420/)
 * (@gigglesslut420)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-mime-type-php-8-issue/)
 * My error logs started showing this error after my hosting updated to PHP 8:
 * PHP Warning: Undefined array key “mime-type” in /public_html/wp-content/plugins/
   imagify/classes/Media/WP.php on line 343
 * It happens when I view the Media list in WP’s dashboard.

Viewing 1 replies (of 1 total)

 *  Plugin Author [WP Media](https://wordpress.org/support/users/wp_media/)
 * (@wp_media)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-mime-type-php-8-issue/#post-15253481)
 * Hi [@gigglesslut420](https://wordpress.org/support/users/gigglesslut420/),
 * This is Joseph from Imagify, and I’ll gladly assist you here!
 * This is a very rare error (we are only aware of one other case) and I’m sorry
   this is happening!
 * In that other case, the issue was that some of the images (thumbnails included)
   were missing mime-type meta values in the database, so that’s our best assumption
   as to what is causing this PHP warning for you as well.
 * If you’d like, you can install our Imagify Tools helper plugin using the following
   link to download it:
 * [https://github.com/wp-media/imagify-helpers/raw/master/various/imagify-tools/imagify-tools.zip](https://github.com/wp-media/imagify-helpers/raw/master/various/imagify-tools/imagify-tools.zip)
 * With that installed and activated, if you go to your Media Library and click 
   on any of your images, when you scroll down the page, there will now be extra
   info listed about the image. In the section “Mandatory WP metas” you can check
   to see if any of the thumbnail versions are missing the mime-type value.
 * In the other case, you can see here that for some of the thumbnails, it was missing:
 * > [View post on imgur.com](https://imgur.com/CLr70ev)
 * Unfortunately, I’m not sure there is a solution for this we can offer from our
   end, and it’s hard to know exactly why the mime-type metas could be missing from
   your database.
 * However, if you are able to find all the images with the missing mime-type metas,
   then you could try deleting those images and replacing them with local copies(
   if you have them) or the original backups, optimizing them again, and then testing
   if you still get the PHP warnings.
 * The folder where the original backups are kept is here in case you need it:
 * /wp-content/uploads/backup/
 * Please let me know if you have any further questions on this and I’ll be very
   happy to assist however I can!
 * Best regards,
    Joseph

Viewing 1 replies (of 1 total)

The topic ‘Undefined array key “mime-type” – php 8 issue?’ is closed to new replies.

 * ![](https://ps.w.org/imagify/assets/icon-256x256.gif?rev=3452959)
 * [Imagify: Optimize Images for Top Speed (Compress & Convert to WebP/AVIF)](https://wordpress.org/plugins/imagify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/imagify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/imagify/)
 * [Active Topics](https://wordpress.org/support/plugin/imagify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/imagify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/imagify/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WP Media](https://wordpress.org/support/users/wp_media/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-mime-type-php-8-issue/#post-15253481)
 * Status: resolved