Create image with imagepng() (fails at header)

You could try using get_template_directory() instead of ABSPATH. If wp-content is not in it’s original location on production server that might solve your problem. Mind the lack of trailing slash after get_template_directory(): $font = get_template_directory().’/ledboard.ttf’; … file_put_contents(get_template_directory().’/img/’.$arrayFuels[$i].’.png’, $data);

Specify which image sizes are created on a per image basis

WordPress isn’t natively friendly to such granular size management. Also it could take a considerable toll on humans to manage it, if manual. The common approach is to switch image sizes generation from the moment of upload to the moment of size being requested. So the sizes which are never actually used are never generated … Read more

Change Featured Image Size of the Post

In you WordPress Admin, Go to Settings > Media, here you can set the default size of ‘thumbnail’,’medium’ and ‘large’. If you read through the codex page of the_post_thumbnail() you would have found that it has parameters that can be used to fetch a precised size of the image. the_post_thumbnail(); // without parameter -> ‘post-thumbnail’ … Read more