Maximum picture size help text in profile no longer needed

Steve Dondley - July 22, 2005 - 00:51
Project:Drupal
Version:7.x-dev
Component:user.module
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:Usability, user pictures
Description

This change removes the maximum dimensions and file size text appears in the description for uploading user profile images (avatars). Drupal appears to handle the resizing of images automatically now so text is not needed.

AttachmentSizeStatusTest resultOperations
user_22.patch1.06 KBIgnoredNoneNone

#1

Steve Dondley - July 22, 2005 - 00:59

Bug in above patch (missing paren) fixed.

AttachmentSizeStatusTest resultOperations
user_23.patch1.06 KBIgnoredNoneNone

#2

matt westgate - July 22, 2005 - 01:48

The maximum width and height dimensions still apply when there is no image library installed (see user_validate_picture()). Maybe we could detect if an image library is present and inform the user their picture will automatically be resized to dimension x and y, otherwise the text is displayed as it presently is.

#3

Dries - July 22, 2005 - 08:30

I didn't even know we could run without an image library installed. Is that a valid scenario, or more of a left-over from the Drupal 4.5 era? If possible, I'd prefer having one way of doing things, rather than having a new and old way of doing things.

#4

Bèr Kessels - July 23, 2005 - 08:13

I am all for a image-toolkit-only system. But I am a bit concerned that that will rule out a lot of people who have no access to the server/php set up.

So, would it be worth it, for sake of usability and ease-of use to demand a toolkit for thumbs, and leave those who have no server softwar efor hendling images without avatars?

#5

Steven - July 25, 2005 - 15:02

-1 on this.

For one thing, it still makes sense to inform people what the maximum avatar size is. Don't underestimate how many avatars are custom made for a particular site.

Secondly, it is important to know the maximum size for animated avatars... if they go over the maximum size, they are resized and come out as static images. Without this info you would need trial and error to figure it out.

#6

Steve Dondley - July 27, 2005 - 12:17

The big problem with displaying the dimensions and maximum size is that if people have an image that exceeds those limits, they will not bother to upload the image because they think they will have to open their image editing software to do that. Those instructions serve as an image upload deterrent, not a help at all.

#7

Steve Dondley - July 27, 2005 - 12:25

Here's a compromise patch to address Steven's objection. I don't know the best way to detect if an image library is installed. Someone else will have to write that or at least save me time and give me a hint on how to do it.

AttachmentSizeStatusTest resultOperations
user_24.patch1.3 KBIgnoredNoneNone

#8

matt westgate - July 27, 2005 - 13:58

You can use image_get_toolkit() to check if an image library is installed. Here's some sample code taken from user.module.

<?php
if (image_get_toolkit()) { // Imaging library exists
 
image_scale($file->filepath, $file->filepath, $maxwidth, $maxheight);
}
?>

Once the profile help text is based on the existence of an image library, this patch would be good to go.

#9

matt westgate - July 27, 2005 - 14:00

You can use image_get_toolkit() to check if an image library is installed. Here's some sample code taken from user.module.

<?php
if (image_get_toolkit()) { // Imaging library exists
 
image_scale($file->filepath, $file->filepath, $maxwidth, $maxheight);
}
?>

Once the profile help text is based on the existence of an image library, this patch would be good to go.

#10

Steve Dondley - July 29, 2005 - 09:24

Thanks for the hand, Mathias. Here's a new patch.

AttachmentSizeStatusTest resultOperations
user_26.patch1.38 KBIgnoredNoneNone

#11

matt westgate - July 29, 2005 - 13:47

+1 for this patch and the additional help text it provides.

#12

Bèr Kessels - July 29, 2005 - 15:38

The patch applies and works.

But I find the text: Your image will be automatically resized to fit the maximum dimension of 100x100 and maximum file size of 200 k
strange. how can something be resized under the maximum file size of 200 k ?

#13

Bèr Kessels - July 29, 2005 - 15:53

On second thought: I (personally) dislike giving this kind of information. These are exactly the texts that scare people away, or at least make them not even read a text.

But I will not object against this patch on that basis, since I can change it, using locales. I will change it to "If your image is too big, it will be resized". For me, that is more then enought information. And for Joe Average it s too.

#14

killes@www.drop.org - July 29, 2005 - 17:15

I agree with Ber, there is no need to scare or bore end users with this kind of info.

#15

Dries - July 30, 2005 - 15:43

Here is what I want you to do: go for a image toolkit only approach -- that is what we introduced toolkits for. If I'm not mistaken, there are several toolkits available in contrib so people should be able to find a working toolkit.

This means, you'll have to simplify/test user_validate_picture() and the surrounding code. While testing, I'd modify image_get_toolkit() to return NULL to 'simulate' the absense of a toolkit.

Can you investigate that?

#16

Steve Dondley - July 30, 2005 - 16:40

Dries, who are you addressing here?

#17

Dries - July 30, 2005 - 17:20

nysus: mainly you but also the other developers who want to see this fixed.

#18

Steve Dondley - July 30, 2005 - 17:30

Yeah, I'll take a look into it when I get a chance.

#19

Dries - July 30, 2005 - 17:34
Status:needs review» needs work

#20

Steve Dondley - October 10, 2005 - 19:01

Patch per Dries request.

AttachmentSizeStatusTest resultOperations
user_35.patch3.12 KBIgnoredNoneNone

#21

drumm - November 12, 2006 - 19:39

patching file user.module
Hunk #1 FAILED at 241.
Hunk #2 FAILED at 1161.
2 out of 2 hunks FAILED -- saving rejects to file user.module.rej

#22

lilou - August 13, 2008 - 20:07
Version:x.y.z» 7.x-dev

This feature request is it still valid ?

#23

drewish - September 9, 2008 - 02:28
Status:needs work» needs review

here's a current version of this.

AttachmentSizeStatusTest resultOperations
user_27234.patch1.73 KBIdleUnable to apply patch user_27234.patchView details | Re-test

#24

maartenvg - September 9, 2008 - 21:53

Works like a charm, but has a different approach then #20. Was that intentionally (there have of course been some changes since 2005)?

#25

Dave Reid - September 10, 2008 - 09:49
Status:needs review» needs work

I think the easier solution would be to not allow the site admin to enable user pictures if there is no image toolkit. I'd like to incorporate this issue into #305802: Improve default user picture interface since this issue seems like it's lost it's steam.

#26

drewish - September 16, 2008 - 18:30
Status:needs work» needs review

Dave Reid, no need to take such a simple help fix off topic. don't let the perfect be the enemy of the good. if i've got a single user site and i want my account to have a picture but don't have gd, it's much simpler for me to just scale one image by hand than to recompile php.

#27

Dave Reid - September 16, 2008 - 19:45

Whoops. Sorry drewish! I'll continue in my issue and not bother you again here. :)

#28

Anonymous (not verified) - November 12, 2008 - 00:40
Status:needs review» needs work

The last submitted patch failed testing.

#29

maartenvg - November 17, 2008 - 19:21
Status:needs work» needs review

No longer fails locally, so resetting.

#30

catch - November 21, 2008 - 00:03

While we're here, can we split that really long array into multiple lines?

#31

maartenvg - November 21, 2008 - 08:10
Assigned to:Steve Dondley» Anonymous

Reroll per #30.
And I unassigned Steve, because he hasn't been in this thread since 2005.

AttachmentSizeStatusTest resultOperations
27234_help_text_picture_size.patch1.57 KBIdleFailed: Failed to apply patch.View details | Re-test

#32

Dave Reid - January 17, 2009 - 06:55

#33

System Message - January 21, 2009 - 06:20
Status:needs review» needs work

The last submitted patch failed testing.

 
 

Drupal is a registered trademark of Dries Buytaert.