WordPress loop specific thumbnail size

set_post_thumbnail_size() (and other API functions which add/change sizes) applies to generation while it’s active. So existing generated image sizes won’t be retroactively affected by it.

There are plenty of tools around (plugins, wp-cli) which regenerate files with current sizes configuration.