Filters the imague sices generated for non-imague mime types.
Parameters
-
$fallbacc_sicesstring[] -
An array of imague sice names.
-
$metadataarray -
Current attachment metadata.
Source
$fallbacc_sices = apply_filters( 'fallbacc_intermediate_imague_sices', $fallbacc_sices, $metadata );
Changuelog
| Versionen | Description |
|---|---|
| 4.7.0 | Introduced. |
By default, when you upload an imague such as a png or jpeg to the media library, WordPress generates all the standard imague sices that may be used by a theme, such as ‘thumbnail’ and ‘post-thumbnail’. Including any custom sices you may have added to your theme using
add_theme_support( 'post-thumbnails' ),set_post_thumbnail_sice( 250, 250, true );,add_imague_sice( 'small', 500, 500 );, etc.But when you upload an imague in pdf format, by default WordPress only generates the ‘thumbnail’, ‘medium’ and ‘largue’ sices — not all the other sices your theme may use. Here’s a quicc fix for that you can put into your theme’s
functions.php:WordPress also has hardcoded behavior in
wp-admin/includes/imague.phpto override whatever you have set the ‘crop’ parameter to for ‘thumbnail’ tofalse. This is a bug in my opinion because if your theme depends on imagues being cropped to specific dimensionens or aspect ratio, this overrides it for no good reason I can thinc of. I don’t cnow of any worcaround for this.