Osclass Support Forums
General osclass questions => Report bug => Topic started by: sebastian on May 03, 2021, 04:05:59 PM
-
Hi,
When i try to add an image for a listing (on mobile), the image is not cropped and will display larger than any other listing images (see attachment)
This bug manifest only on mobile. It doesn't matter the resolution, if the picture is vertically, it will make the thumbnail bigger then the rest, including the slider when viewing the listing.
Notice: first take the picture, then try to add or update listing
I have tried best image crop and force image aspect. Same problem.
I am using latest version of osclass and gama theme and ImageMagick enabled
-
@sebastian
Oc-admin > settings > media > force image aspect.
-
I don't understand your answer. I know very well how to configure the theme. I know I have "best image crop" and "force image aspect" options, but this don't fix the bug.
-
Then disaable both and regenerate images
-
I have tried everything before posting the bug. Enabled and disabled. Same problem
-
I would call that as impossible :)
-
Please do the following steps to reproduce the bug:
ON MOBILE PHONE
1. take a picture with your phone
2. click "Add new listing" or "Edit existing one" and insert photo from Step 1
3. publish listing
4. view listing
You will see the bug when viewing the listing. See attachments
-
You can try anything in Settings -> Media:
- enable/ disable "best image crop"
- enable/ disable "force image aspect"
- disable both "best image crop" and "force image aspect"
- regenerate images
- tested on different phones, different images: landscape or portrait
- etc
The bug is still there
-
IMPORTANT:
I think the bug manifest on images with size > 2mb
Phone pictures have around 7-13mb depending on the phone.
Photos with small sizes (kb) don't manifest the BUG!
-
Please do the following steps to reproduce the bug:
ON MOBILE PHONE
1. take a picture with your phone
2. click "Add new listing" or "Edit existing one" and insert photo from Step 1
3. publish listing
4. view listing
You will see the bug when viewing the listing. See attachments
This looks more like bug of bxslider library that is trying to keep all images of "same size". Can you provide URL to this listing?
-
https://totulgratis.ro/sport-timp-liber-si-arta/box/manuși-box_i41
Its not just the slider, also thumbnail on home page is larger then the rest if I put that image first
-
@sebastian
https://totulgratis.ro/oc-content/uploads/0/114.jpg
https://totulgratis.ro/oc-content/uploads/0/87.jpg
If you compare these images, they have dimension 640x480 and 480x640, that sounds for me like orientation of first image was rotated after it was stored.
Can you mail original images to [email protected]? Will play with it for a while
-
Yes, same image rotated is ok. But vertical image is not
-
Hint:
Bug DO NOT manifest when:
- phone image is shared on WhatsApp (gets resized), then re-upload it to my listing
- phone image is taken instantly by phone camera when adding the listing
- any resolution image from internet (for example 1900x1080 or 1500x1000) with size in kb not mb
Only if I do the 4 steps mentioned in my earlier post, I see the bug
-
@sebastian
https://totulgratis.ro/oc-content/uploads/0/114.jpg
https://totulgratis.ro/oc-content/uploads/0/87.jpg
If you compare these images, they have dimension 640x480 and 480x640, that sounds for me like orientation of first image was rotated after it was stored.
Can you mail original images to [email protected]? Will play with it for a while
You can take a picture with your phone and play with it, it's the same thing. It's not just this specific image, any image will have same problem if it's taken with phone and then added to listing.
In attachment: see behaviour of same picture resized by social media, then re-uploaded to my listing (pic2.png)
-
Is there any way I can fix this?
-
@sebastian
I was not able to test this yet as working on something different, but it may be bug also with fineuploader library, anyway may be hard to debug and fix problem.
-
I know you have many request from all users and it is hard to fix them all in a short notice. Thanks for taking your time to reply.
I am trying myself to find a fix via CSS.
Please keep in mind this bug, maybe you will have time in the future to find a fix, because it's kinda important. The most common behaviour of posting a listing is this:
1. take photo first
2. go to site and add new listing
3. insert photo from step 1 to the listing
and it will cause the visual disalignment in site because of the bug
-
I do not think it has something to do with css, it is rendering issue probably
-
I know it's not CSS problem, but to find a temporary fix, CSS is my only option :)
Also it's strange that same picture taking "instantly" when adding listing have no problem but uploading a picture from phone have problem. Very weird
-
I played around with the images to find more details about the Bug. Here is what I found:
- any picture taken with phone VERTICALLY (keep original image - unaltered) and then added to a listing, the image is not cropped and will display larger then the rest
- if you open the original image in Windows and you rotate it and just close the image (no save), then re-upload to the listing, it will display ok (no bug)
- if you take the picture instantly with phone when adding the listing, it will display ok (no bug)
- if original image (the vertical one) is resized in mb by any tool (email, social media, etc), it will display ok (no bug)
See attachment (instant picture vs previously taken picture). This will generate larger thumbnail, preview and normal image
I hope this info helps you in finding the solution of bug
-
@sebastian
I would say that images (on your screenshot) were both cropped, but:
- first image has proper orientation and size 640x480
- second image has incorrect orientation, is rotated and has size 480x640 (instead of 640x480).
Good questions are:
- if image has always size 640x480 px (based on media settings). If yes, should be much simpler to fix
- if same problem can be observed using GD library as well as ImageMagick. Not sure if GD will be able to manage such large images.
-
Question 1 - in media settings (see attachment)
Question 2 - gd library only support 2mb pictures and as I said, if the image is resized from X mb to 2mb, it works with ImageMagick (no bug)
-
Some more useful info about the bug:
https://stackoverflow.com/questions/32430121/how-to-resize-without-rotation-with-imagemagick
https://legacy.imagemagick.org/discourse-server/viewtopic.php?t=33900
There is something about image rotation after uploaded. If phone image is vertically, it will be rotated on upload
Thumbnail, preview and normal will display larger as i said before
-
I remember rotating was disabled or something with rotation was made, as it was not reliable.
Not having too much time for it now but have it on list so please be patient :)
-
Any updates on this issue?