WP: Fix memory issue when cropping small images