itsthatguy / avatars-api-middleware

The express middleware for our avatars service
http://avatars.adorable.io
Other
749 stars 96 forks source link

extensions affect the returned avatar #99

Open rylnd opened 5 years ago

rylnd commented 5 years ago

We previously had code in place that made the requests /avatars/foo.png and /avatars/foo "the same;" it was accomplished by simply stripping the extension out of the identifier. I removed this code because I thought it was silly, but I realize now that it's really a stopgap for #19.

Avatar-wise, the extension should not affect the result. Long-term, it should affect the content-type of the response.

The main reason to fix this sooner rather than later is that the .png toggle on the avatars site now behaves "weirdly," in that it actually changes the avatar being displayed.

qaisjp commented 5 years ago

Yeah the URL on the website gives a .png but the image displayed is without the .png