• Resolved giggles420

    (@gigglesslut420)


    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

    (@wp_media)

    Hi @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

    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

    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.