WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 5 weeks ago

#54104 new defect (bug)

Media Library thumbnails broken with PHP 8

Reported by: knieriemrt Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords: dev-feedback reporter-feedback
Focuses: Cc:

Description

WordPress 5.8.1
PHP 8.0.10
All plugins disabled
Default Theme

I upgraded our PHP to 8.0.10 and WordPress is unable to generate thumbnails for images I upload into the media library. I tried a thumbnail regenerating plugin and that did not work either. I tried PHP 8.0.3 and it didn't work. I dropped the PHP version down to 7.4.11 and it started working again.

I am not the only person with this problem:
https://wordpress.org/support/topic/wordpress-5-8-5-7-media-library-issue-with-php-8-0/#post-14855889

Change History (4)

#1 @Hareesh Pillai
6 weeks ago

  • Keywords dev-feedback added

Hello @knieriemrt, Welcome to WordPress Core Trac.
Thanks for trying out the debug steps and the detailed report.

Just wanted to report that I tried to replicate this in my local install (PHP v 8.0.3), however, I do not face the said issue.

I'm starting to think if this has got something to do with the way the server is set up. I'd wait for other reviewers to share their views.

#2 @knutsp
6 weeks ago

  • Keywords reporter-feedback added
  • Version 5.8.1 deleted

This is most likely caused by the PHP configuration, like missing recommended extensions. Tools - Site Health - Info - Media handling has more info.

#3 @knieriemrt
5 weeks ago

  • Severity changed from major to normal

Thanks for the responses. After enabling the GD extensions I am closer. I can upload images but the thumbnails don't work right until I edit the image, then rotate it left then back right and save it. After I do that the image seems fine. Any ideas why the act of uploading doesn't generate the thumbnails but saving from the image editor does?

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


5 weeks ago

Note: See TracTickets for help on using tickets.