Re-written image generation to use WP_Image_Editor

Signed-off-by: Bjørn Johansen <post@bjornjohansen.no>