If you want to ensure your image sizes remain available when switching themes, then you should place them into a plugin. Create a .php file (name it what you want) and place it in wp-content/plugins/, then paste the following:
<?php
/*
Plugin Name: My Custom Image Sizes
Plugin URI: http://pippinsplugins.com/
Description: Images sizes to be used in all themes
Author: Pippin Williamson
Author URI: http://pippinsplugins.com
Version: 1.0
*/
add_image_size('thumb' , 130, 65, true ); // Thumb
add_image_size('max' , 610, 305, true ); // Maximum
add_image_size('min' , 270, 135, true ); // Minimum
Once you activate the plugin, your image sizes will be available no matter what theme is activated.
Related Posts:
- Setting default thumbnails size & creating multiple thumbnail sizes
- How to fit image to Thumbnail canvas size?
- thumbnail crop not working
- set_post_thumbnail_size vs add_image_size
- the_post_thumbnail responsive srcset not populating with custom image size
- Set custom name for generated thumbnails
- New image size version only for the Featured Image file
- wp_get_attachment_image_src always returns full-sized image
- How can I upload video, generate thumbnail and convert to different formats?
- Thumbnails of same size with different crop
- How to Replace YouTube Videos with a “Click to Play” Thumbnail?
- Why is wp_get_attachment_image_src returning wrong dimensions? [duplicate]
- Stop wordpress from creating multiple size images
- Completly disable and remove Thumbnails?
- No srcset for hard-cropped thumbnails
- Getting specific image thumbnail urls of attached images
- wp_get_attachment_image() not working when trying to add width and height attributes
- WordPress 3.5 – Add custom image size
- How to use SRCSET with get_the_post_thumbnail()?
- Thumbnail is corrupt but image is good
- Various thumbnail sizes for WordPress/jquery masonry gallery
- Removing Title Tag from Thumbnails
- Detect if image file is a thumbnail
- Changing playlist shortcode thumbnail sizes?
- Adding a custom field or metabox to the post-thumbnail widget?
- Does thumbnail regeneration edit the database?
- Cannot get full thumbnail size using the_post_thumbnail
- Custom image sizes only for thumbnails
- Thumbnail and Featured Image With Fixed Sizes?
- Save image as featured image
- How to make thumbnail image fit into a div where image dimentions are completely different?
- Thumbnails produce unwanted gray pixels on white background [closed]
- Is there a way to change a post’s thumbnail image(s)?
- Featured Images does not show in custom post type
- How to removes all instances of thumbnails displayed in my theme?
- ‘Thumbnail’ and ‘Medium’ Image sizes are different than expected
- Is it possible to nest get_previous_post()?
- How to link to featured image to media file URL
- How to get cropped thumbnail source for custom post type
- Get ID of featured image using “get_post_thumbnail_id(the_ID())” – without printing to screen?
- Post thumbnail not working after regenerate
- Thumbnails Not generated when sharing on WhatsApp
- how to link post-thumbnail to original img in a lightbox?
- Add padding while generating thumbnail
- Single-post preview repeats thumbnails in Jupiter Recent Posts widget
- Fixing image names for a site being restored
- How do I turn a post thumbnail into a background image?
- “Medium” size image displayed instead of “thumbnail” in only one post, other posts are fine
- get_post_thumbnail_id() Doesn’t return value [closed]
- How To Add and Display Category Image
- get_the_post_thumbnail(‘thumbnail-name’) always returns empty string
- How can I check for a thumbnail in WordPress?
- Admin – no Featured image choice in create new/page|post
- Why are thumbnails not being generated for PDF files?
- Thumbnail is showing outside its div instead of inside it
- get_post_thumbnail does not display thumbnail
- Else/If Statement to Display Photo Descriptions
- Using Image Sizes for Custom Post Types outside the Loop
- Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio
- Timthumb not working with WordPress 4.0
- the_post_thumbnail returns full sized image, how to debug?
- how can I call a posts featured image in any template?
- how to resize thumbnail image
- add youtube thumbnail in index and single.php add video
- How to add thumbnails to posts and pages automatically in a uniformed fixed elegant way?
- Different thumbnails for index and article page
- Exclude Multiple Post Thumbnails From Post Attachments
- How to add Support to show Fullwidth Featured Image of Custom Post Types in WordPress.?
- Thumbnails not being generated for PDF files
- Thumbnail size problem Desktop vs Mobile site
- Custom thumbnail crop offsets
- Display Multiple Photos as Featured Image when mouse moves on to it post
- How can i place square Feature Image withing the body of post aligned top left or top right in wordpress?
- Error 500 in loop to create posts and thumbnails
- Thumbnails are hard cropped not matter what
- Featured image size always cropped bottom
- Why image Thumbnail url is not displaying with custom size?
- Does WordPress have a way of changing the ‘Natural’ size of uploaded images?
- Best way to manage theme images
- add_image_size cropping changes on Mobile devices
- Full width thumbnail
- external url for post thumbnail and title
- Serving resized images on a responsive site without making 2x copies
- Thumbnails resized and not cropped in the center
- Trouble Retrieving Thumbnail URL on Front-Page
- How to delete post thumbnails in index page? (twenty fourteen theme)
- Thumbnail of the latest posts page
- Retrieve image from Open Graph of an external URL and set as featured image
- Media Library Image Sizes in Bones theme (add_image_size)
- Thumbnail Look For WP
- How to strip thumb from widget
- get_the_term_list & url
- Automatic adding thumbnail to post
- How can I add a featured thumbnail into a div via a data-image-src?
- Thumbnails loading forever
- Is mytheme_post_thumbnails() still necessary?
- How to crop thumbnail size, from both width and height sides
- WordPress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)
- Images thumbnail not cropping square
- Getting post-thumbnail hentry category-error – How can I fix