Bartik uses the following CSS to "shrink" down user pictures when displayed on nodes.

style.css: #block-system-main .submitted .user-picture img {
height: 20px;
}

I could have a giant image depending on my select user picture image style, and it will still get shrunk down. I don't think we should be doing this, although I understand the aesthetic reasoning behind it. None of the other core themes do this however.

Comments

jbrown’s picture

Yeah - this is terrible.

Images should be scaled server side.

Jeff Burnz’s picture

Status: Active » Needs review
StatusFileSize
new1.22 KB

I agree this is a bug - users have the option to scale images using the presets built into Drupal but nothing will change when they do so - this introduces a WTF for Drupal users.

We have to see this from the perspective of the new user, who does not know what CSS is (nor should they need to, or even care about such things). For them Drupal is just broken.

This somewhat relates to #895898: Comment user picture can overflow its container where again assumptions were made about user picture sizing.

Jeff Burnz’s picture

Issue tags: +Needs design review

Bohjan, yoroy?

Jeff Burnz’s picture

StatusFileSize
new347.72 KB

Screenshot of what this change would mean.
bartik-support-user-picture-presets.png

Jeff Burnz’s picture

#2: bartik-user-picture-866484.patch queued for re-testing.

markabur’s picture

The icon-sized images are nicer looking but I can see how some people would want more control over them. So, "looks good" :-\

This could be sort of a shocking change for folks upgrading from b1 to b2.

Jeff Burnz’s picture

Yes its way different but I don't think Bartik should be removing Drupal core features - this is very rough hack by Bartik, not something our flagship theme should be doing. Its right up there with display: none; for removing stuff from the Overlay.... shameful.

tim.plunkett’s picture

Per #3 and the tags, I'll leave as needs review, but this is very necessary.

Jeff Burnz’s picture

Issue tags: -Needs design review

#2: bartik-user-picture-866484.patch queued for re-testing.

Jeff Burnz’s picture

Issue tags: +Needs design review

#2: bartik-user-picture-866484.patch queued for re-testing.

jensimmons’s picture

Title: Node user pictures should not be shrunk down via CSS » Provide an easier way for users to resize user pictures in posts
Version: 7.x-dev » 8.x-dev
Category: bug » feature
Status: Needs review » Needs work

Well, what is happening is this CSS is shrinking down the user picture to be a small hint about who posted the node.

Only local images are allowed.

A better way to do this would be with an image style (formerly known as an image cache preset). If we had a user-icon style, defined as crop to 20px x 20px, then we could use that here. The problem is that's a much larger patch, altering the installation profile, etc. I think it's too late to do such a thing.

Meanwhile, this does work. You are right — if someone who doesn't know any CSS is trying to alter the size of this image, they will have a hard time knowing how to do it. If we'd used an image style, that person could just change the specs for the style.

But beyond switching to using an image style, I don't know what the proposed solution is here. I think removing the CSS altogether is a terrible idea. The icon-sized user icon looks great, and it's a typical way to style author photos on a post. Simply printing the full-sized user photo here is a much worse idea, imo. The photo in comment #4 is a different design. That doesn't look like an author photo, that looks like content in a post. Why would anyone do that to everyone one of their posts? It basically makes "user pictures in posts" unusable.

Also, I don't think the fact Garland handles this differently is a compelling reason to change Bartik. There are a lot of things Bartik and Garland do differently.

I know resizing images with CSS has been frowned upon in the past. The technique, however, is gaining a lot of momentum these days — even being advocated for strongly, because it's a key part of doing responsive web design. More and more front-end developers are resizing images client-side these days. Like this: http://www.alistapart.com/d/responsive-web-design/ex/ex-site-linearize.html I have no shame in shipping a theme that does a client-side image resize.

Honestly, I don't think this is a problem. This works as designed. (I'm not setting this to "closed (works as designed)" however, simply out of respect for Jeff and Tim and all the hard work they've done. That seems too final to do before more discussion.)

I'd prefer to leave this as-is for D7, and reopen this for D8, and switch to using an image-cache preset for this image. Basically giving users an easier way to edit the size of the image is a new feature.

tim.plunkett’s picture

Title: Provide an easier way for users to resize user pictures in posts » Node user pictures should not be shrunk down via CSS
Version: 8.x-dev » 7.x-dev
Status: Needs work » Needs review

I'm really confused... on admin/config/people/accounts, there is a setting for user picture display, which uses image styles. Isn't that what you described you'd like to see in D8? This patch just removes the hardcoded resize.

If I'm missing the point, I'm sorry, and please reset the issue.

Jeff Burnz’s picture

Not removing this is not an option, by using CSS we are taking away a core feature and to end users Drupal will appear to be "broken". End users don't know what CSS is, or what its for, how to change it etc etc - they will go to the user settings, change the user picture size and WTF...

A lot of work was put into including imagecache for user pictures in core, our core theme needs to support end users ability to choose, using CSS reduces the flexibility of the core system and making assumptions about what looks best, in place of what is best for end users (flexibility).

If the end user wants a 20x20 user picture they can have one (using imagecachce in core) if they want a bigger one, they can do that also, but right now they are locked in, which is just not right.

dave reid’s picture

I'm +1 for the solution in #4 because I think we need to be more realistic rather than stick to Bartik's design.

We cannot add a new user picture style at all because that style is applied globally for user pictures. We'd get a tiny 20x20 picture on user profile pages and in comments (see http://dl.dropbox.com/u/840794/Selection_109.png). The real solution is to recommend people install http://drupal.org/project/imagecache_profiles if they want tiny pictures on nodes and that we need to remove the CSS and just display the picture naturally.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

After some discussion in IRC, we (webchick, davereid, and I, and earlier jensimmons) agreed that this patch should go in first to restore the image style functionality to user pictures.

Then, we can follow-up with #968026: Add an image style for user pictures.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

After much discussion with webchick and jensimmons, we decided that the 20x20 image was a purposeful design decision that should remain as-is. The picture next to the submission information shouldn't be tied to the size of the comment/profile picture size, and leaving it as hard-coded is not the strict UX issue I thought it was.

While a staunch advocate for my own patch, I have been thoroughly convinced that Bartik is this way for a reason, and this fix is just wrong. Something along the lines of #968026: Add an image style for user pictures should happen in D8.

dave reid’s picture

Sorry, I just don't agree, but I guess there's nothing we can do until D8 to fix the user profile node/comment/profile context detection.