#6586 closed defect (bug) (fixed)
New avatar uploader on mobile Safari broken
Reported by: | modemlooper | Owned by: | imath |
---|---|---|---|
Milestone: | 2.4 | Priority: | normal |
Severity: | normal | Version: | 2.3.0 |
Component: | Media | Keywords: | has-patch commit |
Cc: |
Description
When you take an image from camera browser crashes.
When taking a landscape image the image is cut off.
See images.
Attachments (5)
Change History (17)
#1
follow-up:
↓ 3
@
9 years ago
only images from library work and an image taken in landscape has issue.
#2
@
9 years ago
- Owner set to imath
- Status changed from new to assigned
Ok thanks for reporting this issue. Haven't noticed this before, so i'll recheck to see if i'm able to reproduce and find a fix.
#3
in reply to:
↑ 1
@
9 years ago
- Keywords has-patch added; needs-testing removed
Replying to modemlooper:
only images from library work
For me taking an image using the camera does not crash at all !! See this screen capture :
image taken in landscape has issue
I'd say it depends if you are using your phone in landscape mode to set your avatar, because in this case, there's no issue: see previous screen capture and following one with the image you added on this ticket:
There's only a problem when using the portrait mode to set an avatar, in this case the image is "cut off" on the right side.
So i've read your advices about this ticket #4859 (using a max width set to 280px). So i guess we could use this size in case of wp_is_mobile()
and that's what i've done in 6586.patch, so in portrait mode we get:
But then, in landscape mode, we have a big white space on the right...
So i think 6586.patch would solve the problem for this ticket and #4859. But i also think we could improve it by having two images at our disposal and choose within avatar.js which one to use depending on the available width of the browser. I'll keep on working on it soon.
#5
@
9 years ago
- Component changed from Component - Members to API - Avatars
- Version changed from 2.3.2 to 2.3.0
I've been thinking about this ticket. And i think we should simply send the Avatar UI width and adapt our BP_Attachment_Avatar->shrink() method to take this into accout.
280 pixels could be "too bad" for some mobile resolutions :)
See 6586.02.patch. I'll test this patch on the test drive and if it's fixing the issue and there are no objections, i'll commit it.
#6
@
9 years ago
I am concerned with setting the maximum crop width of an image to the width of the user's browser. It does not sound robust because would the image not have the wrong size if you switched between desktop and mobile, etc?
I think we need to understand this a bit more before it's committed.
#7
@
9 years ago
Thanks for your feedback @DJPaul
It's not about the crop width of an avatar, the image concerned is a temporary one (it's deleted once the avatar is set): the one used to crop the avatar once uploaded.
So i don't think there is any trouble about this, as i'm making sure to keep a max > avatar full width if the Avatar UI container width (= what i've called $browser_max_width) is too small.
It has no impact on the generated avatar in the end: avatar full = 150x150 avatar thumb = 50x50.
$browser_max_width is confusing, maybe i should use $avatar_ui_width instead
#8
@
9 years ago
Well i confirm the patch makes it much better on the iPhone :)
I've used @modemlooper's image and as you can see, i can see the full image, it's not truncated at the right, and in the end i got a regular avatar see http://imath-buddypress.wpserveur.net/groups/iphone-after-6586-02/
the image