If this image does not exist then the request will be rewritten to the WordPress front-controller before your redirect occurs.
Try the following instead using mod_rewrite at the top of the
.htaccess file, before the
# BEGIN WordPress code block:
RewriteRule ^(wp-content/uploads/2021/09)/image-1.png$ /$1/image-2.png (R=302,L)
$1 backreference in the substitution string simply avoids having to repeat the full URL-path. (
wp-content/uploads/2021/09 – captured from the
Note that this is a 302 (temporary) redirect. If this is intended to be permanent then change to a 301, but only once you have tested that it works as intended in order to avoid potential caching issues.