How can I add custom sizes for PDF thumbnails generation?

We have the fallback_intermediate_image_sizes filter within wp_generate_attachment_metadata(): ** * Filters the image sizes generated for non-image mime types. * * @since 4.7.0 * * @param string[] $fallback_sizes An array of image size names. * @param array $metadata Current attachment metadata. */ $fallback_sizes = apply_filters( ‘fallback_intermediate_image_sizes’, $fallback_sizes, $metadata ); where the default sizes are: $fallback_sizes = … Read more

Add custom css class to wp-list-table row for Media Screen

Using CSS Here is an example: .wp-list-table.media tr:has(.image-icon img[src$=\.webp]) { background-color: orange; } to target all rows in the media list table that matches the image icon source with a .webp file-ending. The secret ingredients in the CSS sauce above are: the :has() relational pseudo class, that enables us to target the parent of specific … Read more

Delete all thumbnails & regenerate them?

Is there a reason you need to delete them first? You can use Regenerate Thumbnails if you need to generate new image sizes after switching themes or registering a new image size. https://wordpress.org/plugins/regenerate-thumbnails/ This plugin also gives you an option to delete images related to unregistered sizes. Note: the plugin is not tested with the … Read more