[openstreetmap/openstreetmap-website] User API call returns image in original size (#1923)

mmd notifications at github.com
Fri Jul 6 20:08:40 UTC 2018


User https://www.openstreetmap.org/user/Angkor%20Wat%20Putt has somehow managed to upload a huge 4160x3120 pixel avatar image. While this isn't shown on the user profile page, the user API call https://api.openstreetmap.org/api/0.6/user/1000005 returns an img URL for the original size. This may seriously screw up tools like OSMCha or iD which want to show a small avatar image next to a user. 

```XML
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="OpenStreetMap server">
  <user id="1000005" display_name="Angkor Wat Putt" account_created="2012-10-23T21:55:57Z">
    <description>Angkor Wat Putt is a fantastic and fun, 14 hole Miniature Golf Course in Siem Reap.Come and knock a ball under and around 9 accurate replicas of the world famous Angkor Temples. Including Angkor Wat, Ta Prohm, Bayon, Banteay Srei, Preah Vihear and the Terrace of the Elephants.Perfect for all the family, young and old. If you need a break from the actual temples to have a bit of fun then do it guilt free.The course is set in a large, well maintained garden with a bar and seating area. So come and spend a few hours and relax with us.</description>
    <contributor-terms agreed="true"/>
    <img href="https://api.openstreetmap.org/attachments/users/images/001/000/005/original/efd82f5510d48e4616c3feeb5b0712f1.jpg"/>
    <roles>
    </roles>
    <changesets count="6"/>
    <traces count="0"/>
    <blocks>
      <received count="0" active="0"/>
    </blocks>
  </user>
</osm>

```


https://api.openstreetmap.org/attachments/users/images/001/000/005/original/efd82f5510d48e4616c3feeb5b0712f1.jpg

There are 2 questions here:

* Would it make sense to limit the avatar image size to something reasonable during upload?
* Should we return a "large" image in the /api/0.6/user call, rather than the original image size?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1923
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180706/acd1126b/attachment-0001.html>


More information about the rails-dev mailing list