Enable GET request on a file (test.com/img.png?a=b)

I want to be able to request an image with either

www.test.com/image.png

OR

www.test.com/image.png&smth=anyt

If I use the second option, I get 404. Also, the server should disregard GET params, they are just needed on client side.