Install customcode.php in your plugin directory or better create a subdirectory called custom code and put this in there. And activate the plugin.
Change names and sizes as required
After installing you will need to regenerate thumbnails - there is a plugin that does that https://en-gb.wordpress.org/plugins/regenerate-thumbnails/
Use the structure to add other custom tweaks without changing teh them's functions.php
Not tested - but should work - any problems let me know so I can tweak...