Open your functions.php files and add the image size:
Example:
add_image_size('slider', 525, 339, true);
Code Breakdown:
'slider'
= Name of the new image size (use this when adding a new image size to the template file).525
= Image Width339
= Image Heighttrue
= The image will be cropped to fit the exact size.
Application: Use the current template (index.php, single.php, etc.) Or create your own. Put this inside a loop (usually right after the_title();
) :
the_post_thumbnail('slider');
Now, when you add a page or message that uses a template, you have added the above code, use the advanced image function to load the image. It will be displayed on the size that you created.
Note: This only applies to recently uploaded images.
source share