<p dir="auto">We have user image helpers:<br>
<a href="https://github.com/openstreetmap/openstreetmap-website/blob/bbd6140f4bdc7746ecbd4d109316b2dd0b6d047f/app/helpers/user_helper.rb#L4-L41">https://github.com/openstreetmap/openstreetmap-website/blob/bbd6140f4bdc7746ecbd4d109316b2dd0b6d047f/app/helpers/user_helper.rb#L4-L41</a></p>
<p dir="auto">But there's something suspicious in their code. <code class="notranslate">options</code> has different keys merged in different places: sometimes it's <code class="notranslate">:size</code>, sometimes it's <code class="notranslate">:width</code>/<code class="notranslate">:height</code>. Are we supposed to be able to pass our own size to the helpers? If yes, which keys should we use?</p>
<p dir="auto">Easier question is <em>do we actually try to pass our own size</em>? There's only one place where we do, the one I remove in this pull request. Does it have any effect, given that helpers sometimes overwrite it? There are different code paths depending on the type of the image. The only path that uses those <code class="notranslate">:width => 25, :height => 25</code> is unprocessed attached image, when this overwrite doesn't happen because we don't yet know the actual image size:<br>
<a href="https://github.com/openstreetmap/openstreetmap-website/blob/bbd6140f4bdc7746ecbd4d109316b2dd0b6d047f/app/helpers/user_helper.rb#L91-L92">https://github.com/openstreetmap/openstreetmap-website/blob/bbd6140f4bdc7746ecbd4d109316b2dd0b6d047f/app/helpers/user_helper.rb#L91-L92</a></p>
<p dir="auto">But we don't really need to set this image size because we override it with css:<br>
<a href="https://github.com/openstreetmap/openstreetmap-website/blob/bbd6140f4bdc7746ecbd4d109316b2dd0b6d047f/app/assets/stylesheets/common.scss#L789-L803">https://github.com/openstreetmap/openstreetmap-website/blob/bbd6140f4bdc7746ecbd4d109316b2dd0b6d047f/app/assets/stylesheets/common.scss#L789-L803</a></p>
<p dir="auto">It's easier not to pass image sizes to helpers. We won't have then to think whether it's <code class="notranslate">:size</code>, <code class="notranslate">:width</code>/<code class="notranslate">:height</code> or <a href="https://github.com/openstreetmap/openstreetmap-website/commit/4ef7b2c651e20f147719f3ff0bec0dc6bfd7ea2c">all of them</a>.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5036'>https://github.com/openstreetmap/openstreetmap-website/pull/5036</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5036/commits/549aa4b6021189d5905eb017160a565913667e4c" class="commit-link">549aa4b</a>  Don't pass width/height to user menu thumbnail</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5036/files">1 file</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5036/files#diff-6d2ef58207c92d1533287af551a075122ba98240a861819047a2ae77b7674f0b">app/views/layouts/_header.html.erb</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5036.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5036.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5036.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5036.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5036">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLFRUSTD77HI4N77V3ZPGNP5AVCNFSM6AAAAABLZTZF36VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2DCMZQGUZDINY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMEL2TU6OXE2JOF6N3ZPGNP5A5CNFSM6AAAAABLZTZF36WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJDA24T4.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5036</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5036",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5036",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>