Orientation of uploaded images is wrong

  • Posts: 78
  • Thank you received: 1
  • Hikashop Business Hikashop Essential
2 weeks 4 days ago #311710

-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.12
-- PHP version -- : 7.2.23

Our customer has started using her iPhone for product photography - however once she downloads the JPG files to Windows and then uploads them to Hikashop, the images are not rotated in accordance with the Orientation settings stored in the EXIF data.

Release notes for Hikashop 3.3.0 state "We now auto rotate the images during the upload when the EXIF data of the image specifies an orientation." Is this still working correctly?

I have also read that JCE occasionally has issues with this. Could JCE be interfering with a Hikashop image upload?

I work on a Mac, so it would be an easy matter for me to strip the Orientation setting, or even use preview to export a properly rotated image before uploading. But I have no idea of a simple way to do that on a Windows machine. without software they don't have or time they don't want to spend.

Please Log in or Create an account to join the conversation.

  • Posts: 67199
  • Thank you received: 9963
  • MODERATOR
2 weeks 4 days ago #311711

Hi,

We indeed added a patch for that in the 3.3.0 and it's still there and working as far as I can test.
JCE is not interfering.
Maybe there is something specific to the images your customer is using or where / how she is uploading them.
We would need that you provide a JPG file with the issue and precise instructions to reproduce the problem so that we can look into it.
Regarding a windows software to auto rotate images based on the EXIF data, you have this one:
savolai.net/software/jpeg-autorotate/
It's free and really easy to use.

Please Log in or Create an account to join the conversation.

  • Posts: 78
  • Thank you received: 1
  • Hikashop Business Hikashop Essential
2 weeks 3 days ago #311739

All I have is a few sample images she provide to me. I can see the exif settings within the files using Preview, and when I export the file from Preview, the new exported file has no Orientation setting and imports properly.

Thank you for the windows lead. I will read up a bit about it and pass it along.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 67199
  • Thank you received: 9963
  • MODERATOR
2 weeks 2 days ago #311801

Hi,

I downloaded all 4 images and uploaded them in a product on my end and they got the proper orientation in all the places I could check in HikaShop.
Could it be that you have an old version of HikaShop on that website and thus it doesn't have the patch for the auto rotation based on the exif data ?
Or could it be that the exif data is missing in these images ?
I checked the exif data in the files you provided and it seems to be missing :
monosnap.com/file/Agyr1wrSjI258yD4oDBkprkGIhozrk

Please Log in or Create an account to join the conversation.

  • Posts: 1884
  • Thank you received: 627
  • Hikamarket Multivendor Hikashop Business
2 weeks 1 day ago #311838

@icomex:

It's likely that it's a server-side problem:
1. Usually no issue, but please double-check that EXIF is enabled in your PHP: /administrator/index.php?option=com_admin&view=sysinfo
2. Your image files have an uppercase suffix (".JPG"), and for certain systems (Unix/Linux) that's not the same as ".jpg". So make sure that in the HikaShop config, under Main -> Images -> Allowed images, you have entered both jpg and JPG -- and, just in case, the same for all other allowed suffixes.

Sidenote:
Kunena (= this forum software) may alter image data when attaching/inserting them in posts. To make sure this does not happen (so the support team gets "original" files), zip them first, then attach them as .zip files.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 78
  • Thank you received: 1
  • Hikashop Business Hikashop Essential
2 weeks 22 hours ago #311857

I can't get the Exif data from the images I uploaded here either. But it's definitely in the files I received from the customer.

Here's what I've found out. First, there was a server issue. Our CPanel configuration for this server did not have the EXIF build extension active in PHP. Once we turned that on, images would rotate properly. I suspect we never saw this before because our background is in printing, so no photo goes through our internal workflow without being sized appropriately out of habit.

Now that PHP sees the Exif data, images are rotated, but these particular files now fail during upload. (We see the red progress bar when we attempt it) We think this is due to the file sizes. Our server is set up to accept large file uploads, but uploading these (which are about 3400px x 4600 px) seems to overwhelm Hikashop's resizing routine IF the file needs to be rotated as well as resized. The sample files they gave us that don't need to be rotated are uploaded and resized correctly. Smaller files upload properly as well.

Our preference, would, of course, be to resize the images beforehand as always, but our customer is shooting photos to be used as inventory shots while working in their warehouse, and would prefer to upload the shots immediately via her iPhone.

While I can make an autorotate script happen pretty simply on a Mac, I haven't found an easy way to scale the image down using ios's built in tools (yet).


It might be worth Hika's time to explore the promise and perils of a direct iPhone-to-Hikashop image workflow. After all, the cameras are pretty good, they're everywhere, and the native size of iPhone images is never going to get any smaller.


We'll keep working on it. Thanks for your help.

Last edit: 2 weeks 22 hours ago by icomex.

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum