Title: Refresh Article Image after Crop
Last modified: January 11, 2017

---

# Refresh Article Image after Crop

 *  Resolved [sebastianroming](https://wordpress.org/support/users/sebastianroming/)
 * (@sebastianroming)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/refresh-article-image-after-crop/)
 * I have the following steps to reproduce:
 * 1. Open a Page
    2. Select an article image 3. Crop the article image 4. Now the
   article image doesn’t refresh on the “edit page”-page, you still see the full-
   size image 5. If you save the page, the cropped image will be rendered in the
   frontend, but in the backend (“edit page”-page), when you re-open for editing,
   you still see the full-size image and you can’t change the cropped part of the
   image and you have to re-crop it.
 * And: is it possible, that – when finished cropping – the windows closes itself
   or that there appears a “OK” button?
 * Btw: Your `CROP_THUMBNAILS_DO_CACHE_BREAK($('#postimagediv img'))` resolution
   from github doesn’t work… 🙁

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * (@volkmar-kantor)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/refresh-article-image-after-crop/#post-8641052)
 * Hi,
    i think your main problem is that you do not get the correct image-size 
   displayed in your featured image box (in edit view).
 * Wordpress will display the “post-thumbnail” image-size in the featured image 
   box by default. But as i learned recently you can adjust, what image is displayed
   on each post type (a post type may be “post”, “page” or any custom post type).
 * Use the following code to adjust the image size that is displayed in your featured
   image box.
 *     ```
       add_filter('admin_post_thumbnail_size','myBackendFeaturedImageSize',10,3);
       function myBackendFeaturedImageSize($size,$thumbnail_id,$post) {
       	if($post->post_type==='post') {
       		$size = 'myImageSize1';//use what ever image size you want to display
       	}
       	if($post->post_type==='page') {
       		$size = 'myImageSize2';//use what ever image size you want to display
       	}
       	return $size;
       }
       ```
   
 * The image should then be updated after you crop this specific image-size.
 * Let me know if it works.
    -  This reply was modified 9 years, 6 months ago by [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/).
    -  This reply was modified 9 years, 6 months ago by [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/).
 *  Thread Starter [sebastianroming](https://wordpress.org/support/users/sebastianroming/)
 * (@sebastianroming)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/refresh-article-image-after-crop/#post-8641064)
 * and have a look: wow, it works like hell 🙂
 * Thank you for your absolutely fast reply and for this awesome plugin!
 *  Plugin Author [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * (@volkmar-kantor)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/refresh-article-image-after-crop/#post-8641089)
 * You may need to add the code from github to.
 * The JS-Code adds a cachebreak-parameter to the image url, so the server needs
   to freshly provide the image. The code on github adds the cache-break also when
   the user enters the wordpress edit view. The plugin will only add the cache-break
   only directly after cropping.
 * For reference: [https://github.com/vollyimnetz/crop-thumbnails/issues/12](https://github.com/vollyimnetz/crop-thumbnails/issues/12)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Refresh Article Image after Crop’ is closed to new replies.

 * ![](https://ps.w.org/crop-thumbnails/assets/icon.svg?rev=1228698)
 * [Crop-Thumbnails](https://wordpress.org/plugins/crop-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/crop-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/crop-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/crop-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/crop-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/crop-thumbnails/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/refresh-article-image-after-crop/#post-8641089)
 * Status: resolved