To regenerate custom image size when image is edited in image editor , You have to add following options in wp_options table using update_option function along with add_image_size.
Example :
$img_size_name="custom-size"; // The new image size name.
if ( function_exists( 'add_theme_support' ) )
add_image_size($img_size_name, 100, 100 , true);
update_option($img_size_name.'_size_w', 100);
update_option($img_size_name.'_size_h', 100);
update_option($img_size_name.'_crop', 1);
Related Posts:
- Custom image size / thumbnail – Crop to aspect ratio even when source image is smaller than set dimensions
- How to delete resized (cropped) image uploads and prevent future resizing?
- Why WordPress automatic cropping all my images?
- How to resize images in wordpress without adding any compression or changing the color profile of the images, possible?
- get_the_post_thumbnail_url with an unregistered size
- Cropped featured image replaces original image in gallery
- add_image_size() zoom-crop
- add_image_sizes ignoring crop sizes and using proportion
- “There has been an error cropping your image” when cropping image
- Image resize with image url
- Cropping an image before inserting into a post
- Why can’t I edit certain images from the WordPress Media library?
- Local WordPress installation doesn’t crop images
- Confusion about arguments sent to add_image_size
- add_image_size() to crop images into squares?
- is it possible to crop cover images in buddypress?
- WordPress crops images differently on retina screens?
- Hero image cropped at different dimensions
- Show image crop window on image upload
- Edit image results in copies of file being created
- Stop WordPress from cropping images using url parameters
- WordPress images not cropping properly
- Mass crop images: Landscape images -> Portrait images
- How do I get a smaller size of an avatar image
- Force square image crop during upload?
- Disable image rename on upload
- Auto-crop width, not height
- wordpress add image size crop function not working in version 3.8
- VT-resize (great alternative to timthumb) : Errors cropping (litespeed, centos 6.3)
- Plugin to select the custom image crop area
- Apply manual image cropping not to thumbnail but medium_large size
- variable crop option with add_image_size()
- Set image dimension for WP_Customize_Image_Control images
- How to get WordPress to resize images for srcset?
- Set default image link target in Gutenberg image block
- Add an alignment option for images
- WordPress adding scaled images that don’t exist (1536×1536 and 2048×2048)
- Image Scaling using get_the_post_thumbnail issue in WordPress
- Prevent large image uploads
- Modifying an uploaded image with ‘wp_get_image_editor’ and ‘wp_handle_upload_prefilter’
- Downsizing Many Large Images Attached to Posts, in Bulk?
- Disabling auto-resizing of uploaded images
- How do I delete thousands of unattached images?
- Wrong domain in uploads folder
- How can i alter the amount of different images sizes being stored?
- How to remove link from an image in a post?
- SSL: How to make customizer images Protocol Relative in WordPress?
- Is there a way to pull the first featured image in a loop and not all other featured images?
- Is it possible to recover featured images after WordPress export/import
- how to stop generating different image sizes from parser
- Change the URL of an image from wp_get_attachment_image_src
- Do I need to resize an image to fit the post?
- Link to large image version instead of original?
- After installing ssl certificate images won’t show
- Random Size on Featured Image
- Some images not found 404 in localhost
- wp_upload_bits does not retrieve images that do not have an extension
- Loose images in uploads folder
- Convert uploaded GIF to non animated image automatically
- Is it possible to split Default WP Media directory to multiple Folder/Subdomain?
- How to make a gallery with dynamic images from URLs?
- Divi Theme – images not showing on front page [closed]
- t5-fresh-editor-stylesheets.php breaks image placement in WP Beta 3 editor
- Find and Use an image’s caption
- Export xml use/import images from theme directory
- Unable to upload images to the Media Library. Getting this erron on the console wp-admin/async-upload.php 403 (Forbidden)
- how to move from content and place them elsewhere on a page template?
- Image editor is not loading
- Images give 404 after changing default domain
- How can I check if the first block is an image aligned left or right?
- How would you add sequentially numbered labels to images in posts?
- Blurry images when using add_image_size with crop
- Can wp_get_image_editor convert to icon?
- How to get image URL from media_sideload_image?
- Product Images Low Quality After Updating From WP 3.5 to 4 [closed]
- How can I change the to for lazyload wp smilies
- Output posts attached images as thumbnails linked to full-size with lightbox class
- Making a parent directory writable by the server
- my featured image of wordpress are not showing in the front end though image are uploaded in media library
- Word press cutting sliding images – not displaying the entire image
- What is the best way to host a site with many images without it being too slow?
- Show featured image in all posts
- How to re-arrange images in default WP Gallery more than one image at once?
- After moving a site to new hosting, not all images are showing in media library
- How to inject alt and title attributes for every image in each post into HTML?
- Custom Background for each page and post
- How to see previous –next image option in the theme?
- How can the alt be added to this wooCommerce category image?
- Displaying “alt” attribute text as captions?
- After I upload a file to library its name converted to dashes
- Image to only show up in the single post page, not on the blog/home page
- How do I display image files as links?
- 3.5.x Theme Customize: Handling Custom Control Requests
- Images in sub-pages fail to load
- How do add custom class and id to the that is generated from media gallery insert image into post [duplicate]
- Adding different classes to different images depending on size for fine control of image layout in posts
- Images uploaded in customized gallery do not link to media
- Is there a way to return a list of the default image size names when they are unset?
- Display image title and caption on posts and pages
- How to disable trackbacks and pings on Images?