[wp-trac] [WordPress Trac] #52509: Error generating Thumbnails of PDF-Files
WordPress Trac
noreply at wordpress.org
Fri Feb 12 12:46:26 UTC 2021
#52509: Error generating Thumbnails of PDF-Files
--------------------------+-----------------------------
Reporter: falk07 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.6.1
Severity: normal | Keywords: needs-patch
Focuses: |
--------------------------+-----------------------------
This is a follow-up to #48853.
This issue seems to be still present in Version 5.6.1
Some PDF-Files cause an internal server error, some do not. (The server's
error log tells something about missing headers)
Here's what i did to isolate the error:
- I examined the PDF-Files. The affected files had a PDF-Version 1.7 an
were created with non-Adobe-Tools (e.g. Office365). PDFs with Version 1.4
and 1.5 (created with Acrobat) worked well.
- tried it with a local copy of the site on XAMPP: No Problems
- used a little code-snippet to prevent thumbnail-generation in general:
Upload works
This is the snippet:
{{{#!php
<?php
function disable_pdf_previews() {
$fallbacksizes = array();
return $fallbacksizes;
}
add_filter('fallback_intermediate_image_sizes', 'disable_pdf_previews');
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52509>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list