-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF images don't regenerate in WordPress v5.3.2 (fix included) #94
Comments
The code indicated by @makbeta above seems to work for Regenerate Thumbnails version 3.1.5 as of 2022-06-01 (using WordPress version 6.0). However, to regenerate a thumbnail for a PDF in the Media Library, you can only do that if you use the Bulk Actions in the Media Library and have selected a PDF using the checkbox. (That is, the option to regenerate a PDF thumbnail does NOT appear when editing the Media, nor does it appear below the title of the Media in the Media Library list view.) Also, IMHO the thumbnail generated is very bitmappy, and yes, ImageMagick library is in PHP. |
This is true. However, if you do a bulk operation of attachments of various types, the error message is confusing ant unnecessary.
I know users who rely on the PDF bitmaps, and they are created in multiple resolutions from full-size, 1024 height and downwards, so I've not been seeing the poor image quality other people have reported. I've submitted a merge request for commit 27c7083. |
The PDF files were skipped and thumbnails weren't generating. Tracked down the issue to a function
get_fullsizepath()
on lines 130-135 in file class-regeneratethumbnails-regenerator.php. The functionwp_get_original_image_path()
will returnfalse
for PDF file.The fix is to check for the false positive and fetch PDFs properly.
Code before:
Code with a fix:
The text was updated successfully, but these errors were encountered: