the_post_thumbnail() image sizing problem?

the_post_thumbnail() allows you to set the size of the image you want to use, the default is thumbnail but you can override it to use any of the defined sizes or a custom size e.g. the_post_thumbnail(‘medium’); the_post_thumbnail(‘large’); the_post_thumbnail(‘full’); the_post_thumbnail( array(980, 450) ); Images generated by WP use srcset to give image dimensions based on device … Read more

Migrate image from my old blog

The problem is a failed assumption, the media library is not a file directory, it doesn’t even look at the uploads folder. When you upload things to WP, it creates an attachment post, and it’s those that get shown in the media library. Otherwise, if it just listed what was in the uploads folder, every … Read more

Disable all resizing and compression

Turns out I was never too far off. Adding this to your functions.php will stop all resizing and compression of images uploaded to the media folder add_filter( ‘big_image_size_threshold’, ‘__return_false’ ); add_filter( ‘jpeg_quality’, function($arg){return 100;} ); update_option( ‘medium_size_w’, 9000 ); update_option( ‘medium_size_h’, 9000 ); update_option( ‘large_size_w’, 9000 ); update_option( ‘large_size_h’, 9000 ); Hope this helps someone … Read more