template changes: placed viariables with image sizes at the top for easy adaption, catch error for no selected images