2

Wordpress has a hook for that. Here is a sample code: function featured_image_dimensions( $content, $post_id, $thumbnail_id ){ $help_text = '<p>' . __( 'recommended dimensions - H980px by W450px', 'my_domain' ) . '</p>'; return $help_text . $content; } add_filter( 'admin_post_thumbnail_html', 'featured_image_dimensions', 10, 3 ); Add ...


1

You can always use the full size, but if the issue is that your images don't cover enough area, you can fix that with CSS and the background-size and object-fit parameters. This will let you use img tags that are larger than the source image, or background images smaller than their container, and allow you to tell the browser how to make the image fit, e.g. ...


1

These images sizes are defined by WordPress, and were added in WordPress 5.3. The comments in the source code describe them like this: These sizes are meant to enhance the way WordPress displays images on the front-end on larger, high-density devices. They make it possible to generate more suitable srcset and sizes attributes when the users upload large ...


1

It doesn't, WP supports responsive image markup, so your browser decides based on various factors such as pixel density, battery, network, viewport, etc


1

You could filter the the_post_thumbnail() function, which will dynamically show the assigned category image across all your custom post type, rather than using acf_save_post to save the category image in the post featured image meta field. By filtering the the_post_thumbnail() for your specific post type, this means if you change the image on category in the ...


1

Create "images" folder in current active theme the put "default-image.jpg" in that folder. <?php if ( has_post_thumbnail( ) ) { echo get_the_post_thumbnail( $page->ID, 'image' ); } else { ?> <img src="<?php echo get_template_directory_uri().'/images/default-image.jpg'; ?>"/> <?php } ?> Use path ...


1

It appears that it's eventually used as a parameter to wp_constrain_dimensions where '0' means 'no limit'. It's only used directly in media.php:85 } elseif ( 'medium_large' === $size ) { $max_width = intval( get_option( 'medium_large_size_w' ) ); $max_height = intval( get_option( 'medium_large_size_h' ) ); if ( intval( $content_width ) > 0 ...


Only top voted, non community-wiki answers of a minimum length are eligible