We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dear all,
if you upload PDF, in metadata sizes we have array with jpgs.
I tried fix with
add_filter( 'webp_uploads_upload_image_mime_transforms', 'core_webp_uploads_upload_image_mime_transforms', 9, 2 ); function core_webp_uploads_upload_image_mime_transforms( $default_transforms ) { $mimes = wp_get_mime_types(); $output_format = webp_uploads_mime_type_supported( 'image/avif' ) ? webp_uploads_get_image_output_format() : 'webp'; $transforms = webp_uploads_is_fallback_enabled() ? array( 'image/jpeg', 'image/' . $output_format ) : array( 'image/' . $output_format ); foreach( $mimes as $k => $v ) { if ( ! isset( $default_transforms[ $v ] ) ) $default_transforms[ $v ] = $transforms; } return $default_transforms; }
If you upload PSD with mime image/vnd.adobe.photoshop and genereate sizes with some custom code (imagemagick support PSD) like PDF does
add_filter( 'wp_generate_attachment_metadata', 'core_wp_generate_attachment_metadata', 9, 2 );
it working ok. I have nice jpg and avif in metadata.
But, different situation is with PDF mime application/pdf. It is blocked by helper.php line 145
$image_path = wp_get_original_image_path( $attachment_id );
and inside function is condition
if ( ! wp_attachment_is_image( $attachment_id ) ) {
We dont have any filter skip this check, so PDF avif is not working. Best would be add filter to "wp_attachment_is" and override.
Im working on LibreOffice (exec soffice), audiowave (exec https://github.com/bbc/audiowaveform ) , PSD / AI (imagemagick) thumbnailer. https://core.trac.wordpress.org/ticket/62712
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Dear all,
if you upload PDF, in metadata sizes we have array with jpgs.
I tried fix with
If you upload PSD with mime image/vnd.adobe.photoshop and genereate sizes with some custom code (imagemagick support PSD) like PDF does
it working ok. I have nice jpg and avif in metadata.
But, different situation is with PDF mime application/pdf. It is blocked by helper.php line 145
and inside function is condition
We dont have any filter skip this check, so PDF avif is not working. Best would be add filter to "wp_attachment_is" and override.
Im working on LibreOffice (exec soffice), audiowave (exec https://github.com/bbc/audiowaveform ) , PSD / AI (imagemagick) thumbnailer.
https://core.trac.wordpress.org/ticket/62712
The text was updated successfully, but these errors were encountered: