How to change this internal image link parameter using PHP?

If you are using wordpress, this guide might help you –
https://developer.wordpress.org/reference/functions/add_image_size/