New answers tagged image-resize
Since you know the location of the image on the disk you can use wp_insert_attachment to insert your big image to the media library. By default this will generate also several smaller versions of the big image that you might not need but this is the easiest way to make all the media related plugins to be aware to your image.
Maybe using the featured image for this posttype and then load the full size picture in there?
Put this in your theme functions file. It will stop Wordpress from creating anything but the 3 default sizes when uploading. When an image is then requested in a particular size, which is not yet generated, it will be created only that once. add_filter('image_downsize', 'ml_media_downsize', 10, 3); function ml_media_downsize($out, $id, ...
Yes, WordPress resizes & crops all images depending on what your theme defined as @Gerard already explained in his answer. So the last boolean argument for add_image_size() is to crop or not. Note that this doesn't define the crop position. To alter that behavior look at this answer for example. What happens inside core? As you've already seen in the ...
WordPress by default is designed to generate 3 types of cropping of any uploaded images (Media): Thumbnail (Typically 150px x 150px) Medium (Typically 300px x 300px) Large (Typically 1024px x 1024px) It's to ensure site speed with different sizes where necessary. So, with uploading the Original image there would be at least 4 files- The Original File ...
Normally it is because a Wordpress theme uses the thumbnails on its code: in loops, galleries, etc. It is defined in the file functions.php: add_image_size( $name, $width, $height, $crop ); For example, like this: add_theme_support('post-thumbnails'); add_image_size('custom-thumbnail', 80, 80, true ); add_image_size('medium-thumbnail', 180, 120, true ); ...
Plugins and Themes can define their own thumbnail sizes. WordPress will convert all newly uploaded images to all registered size definitions.
Top 50 recent answers are included