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
- How to disable WordPress from creating thumbnails?
- set_post_thumbnail_size vs add_image_size
- How To Delete Desired Image Sizes From wp-content/uploads?
- 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
- Add Title Attribute to WordPress Image the_post_thumbnail
- Is there a hook which fires after all thumbnails are generated?
- 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?
- get_the_post_thumbnail_url with an unregistered size
- Cropped featured image replaces original image in gallery
- image_resize in wp3.5 change to wp_get_image_editor and wont work
- Why is wp_get_attachment_image_src returning wrong dimensions? [duplicate]
- Stop wordpress from creating multiple size images
- Can WordPress crop only the post thumbnails?
- Completly disable and remove Thumbnails?
- Query the post which have a thumbnail
- Store thumbnails and uploads in different directories?
- 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
- Autogenerated Thumbnail compression depending on size
- How to use SRCSET with get_the_post_thumbnail()?
- How to use images uploaded with custom implementation of thickbox like the_post_thumbnail() functionality
- Thumbnail is corrupt but image is good
- Thumbnails are not cropped even after selecting “Crop thumbnail to exact dimensions”
- Various thumbnail sizes for WordPress/jquery masonry gallery
- How can i place Feature Image under title field in wp-admin?
- 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?
- Add_image_size not cropping
- Does thumbnail regeneration edit the database?
- Media Gallery Upload Thumbnail Compression is Changing Image Hue
- Disable wordpress image sizes generation
- Media thumbnail for custom post inside post content
- Cannot get full thumbnail size using the_post_thumbnail
- Custom image sizes only for thumbnails
- Underscores.me retrieve next / previous post thumbnail in post_nav function
- Thumbnail and Featured Image With Fixed Sizes?
- List category posts – Thumbnails are not displaying
- How to disable multiple thumbnail generation?
- Regenerate thumbnails unexpected resolution (96 x 96)
- Save image as featured image
- How to make thumbnail image fit into a div where image dimentions are completely different?
- Why am I getting errors in product.thumbnails.php? [closed]
- Thumbnails produce unwanted gray pixels on white background [closed]
- Use ‘medium’ size with catch_that_image() function
- Is there a way to change a post’s thumbnail image(s)?
- Show Post Thumbnail In Custom Post From Other CPT
- Lazyload post thumbnails
- How can I get I get the thumbnail custom size dimensions?
- how i can increase Featured thumbnails size?
- Show featured image next to post-teasers in Genesis Framework?
- prevent wordpress from creating thumbnails of an image
- How check that there is post thumbnail feature image or not on wordpress?
- Force WordPress to strip/remove EXIF/IPTC metadata when resizing thumbnails
- Featured Images does not show in custom post type
- If I Regenerate Thumbnails, would WordPress delete the existing Thumbnails and replace them with ‘new copies’?
- 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?
- How to offset thumbnails to the center?
- Sidebar Thumbs Squished?
- Aligning the thumbnail image
- Post thumbnail not working after regenerate
- Open Image Thumbnail in a new page, while clicking on the link
- Thumbnails Not generated when sharing on WhatsApp
- How to stop thumbnail generation from some images and different size thumbnail generate
- Update old Post image metadata to ‘thumbnail’ wp_attached_file
- How to stop wordpress always displaying full-res images
- Thumbnail position + size
- Why are some thumbnails on their side – but correct when I go to edit image? [closed]
- How do get post thumbnail into plugin?
- how to link post-thumbnail to original img in a lightbox?
- Is there a way to avoid using add_image_size? Best way to manage images
- How to display first post thumbnail as a background image of a widget?
- Add padding while generating thumbnail
- Single-post preview repeats thumbnails in Jupiter Recent Posts widget
- Fixing image names for a site being restored
- Can’t generate thumbnail images
- 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
- How to create resized versions of images added with wp_insert_attachment
- get_post_thumbnail_id() Doesn’t return value [closed]
- How to have the thumbnail cropping tool working
- How To Add and Display Category Image
- get_the_post_thumbnail(‘thumbnail-name’) always returns empty string
- how to post default thumbnail if post not created yet