Images with URL encoded characters in WordPress uploads folder returning 404s

Solution:

This would seem to be a URL encoding issue on the initial HTTP request from the client, not related to your .htaccess file. If the actual filenames contain %22 then that needs to be URL encoded as %2522 (ie. the % in %22 needs to also be %-encoded) in the request, otherwise, it’s going to look for a file containing ", not %22 (when the requested URL is decoded).

This isn’t a problem with your .htaccess file, although you could potentially resolve this with the help of .htaccess (to manually URL encode these requests), but only if you are unable to “fix” the requested URLs in the HTML source. Fixing these URLs at source would be the preferred solution.

Needless to say, avoiding special characters in the filename in the first place (ie. sanitizing uploaded filenames) would be preferred. The double quote (") is an invalid char in Windows OS filenames, so that may be why it’s remained %-encoded in the filename? But otherwise, %-encoded chars have no place in filenames, since this is a URL encoding scheme.