Image max size on new badge listing UI

AI-generated summary

In a discussion regarding the new badge listing UI, downey reported that the interface failed to impose maximum dimensions on badge icons, causing layout issues. cpradio noted that while font-icons scale easily, image-based badges require specific CSS constraints to handle different sizes across user profiles and listing pages. downey clarified that unlike font scaling, images need absolute size limits, a challenge further complicated by the need for high-resolution assets on Retina displays downey. tobiaseigen suggested that setting display limits or requiring admins to upload resized images are both viable solutions. The issue was ultimately resolved with CSS tweaks, as confirmed by codinghorror, who pointed to the Imgur community as an example of the fixed implementation.

Looks like the (otherwise beautiful!) new badge listing UI doesn’t impose a maximum width/height on the icons, oops! :slight_smile:

See: OpenMRS Talk for live demo.

1 „Gefällt mir“

so don’t do that. :wink:

Easier said than done for badges that use images instead of font-icons. There should be some sort of limit set on the corresponding page. As the user profile would have one size and it seems the badge listing pages would have another.

2 „Gefällt mir“

Yup, image badges should be able to be scaled just as done for Font Awesome. But for images, there’s always an absolute maximum size, so you have to constrain it with CSS vs scale it up by font size. :slight_smile:

interesting to see how other sites use the badge listings, and to learn that admins will just use user profile images instead of preparing an icon/image and uploading it just for use on the badge page. If this can be easily addressed by putting limits on the display size then I’m all for it. If not, uploading resized images for use as badges seems fine to me as well.

For high DPI (aka Retina) displays, you need to provide images that are 2 to 3 times larger than the apparent displayed size (e.g. for a 100px wide badge, it needs to be at least 300px wide), so this problem would exist even with different sized images for different places.

4 „Gefällt mir“

This is now fixed, just needed some CSS tweaks, as you can see at https://community.imgur.com/badges for example.

5 „Gefällt mir“