Avatar size problem


(lucky) #1

There are two avatars, the first is 174px at 250px (gif), the second 174px is at 250px (png), Gif - It is set fine, and png turns into a square

PNG - 174px 250px

GIF - 174px 250px

img.avatar { 
        border-radius: 0%;
        width: 180px;
        max-height: 250px;
        height: auto;
    }

(lucky) #2

I raise topic :roll_eyes:


(Régis Hanol) #3

Highly recommend that you learn CSS first. Here are a few useful links to get started


(lucky) #4

But the dimensions are the same


(cpradio) #5

I’m fairly certain that the call at Size topic avatar, has an assumption for non-GIF files to be square, but that is purely a guess.


(lucky) #6
<script type="text/discourse-plugin" version="0.4">
    api.changeWidgetSetting('post-avatar', 'size', '180');
</script>

(cpradio) #7

Right, I’m claiming that is likely what is forcing it to be a square for PNG. I’d have to dig into how avatars are created, but that would be my guess at this point.


(Mittineague) #8

It’s been a while since I uploaded an atypical avatar, but IIRC, there as some type of “will be cropped” message as well as the “may take a while” message.