Post by Mariogs » Thu Jan 16, 2025 3:53 am

I made some photos with my samsung phone.
And when I open that on my PC are all portrait but imediatelly when I upload it to opencart are all landscape.
I use opencart 3.0.4.0.
How to solve that so pictures are in position as they are made - portrait?

Attachments

???
2025-01-15 20_52_25-Seller Products – Mozilla Firefox.png
Last edited by Mariogs on Sun Feb 09, 2025 1:07 am, edited 2 times in total.

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by Cue4cheap » Thu Jan 16, 2025 4:07 am

Mariogs wrote:
Thu Jan 16, 2025 3:53 am
I made some photos with my samsung phone.
And when I open that on my PC are all portrait but imediatelly when I upload it to opencart are all landscape.
I use opencart 3.0.4.0.
How to solve that so pictures are in position as they are made - portrait?
When you took them were they in landscape or portrait?
When you look at them on the computer are they landscape or portrait?
How are you uploading them to the site?

My first thought is to look at them on the computer and adjust them.
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Joe1234 » Thu Jan 16, 2025 11:00 am

In the past I've had some odd things happen with landscape vs portrait in general that didn't make any sense, although those issues had to do with video. First thing to check is the actual dimensions of the image, don't go by how whatever application is orienting it. Right click on the image, go to properties->details. Is the width larger than the height.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by nonnedelectari » Thu Jan 16, 2025 11:33 am

Not sure if it is this but the upload handler of the filemanager in admin has this:

Code: Select all

			'image_versions' => array(
				// The empty image version key defines options for the original image:
				// Keep in mind that these options are inherited by all other image versions!
				'' => array(
					// Automatically rotate images based on EXIF meta data:
					'auto_orient' => true
				),
				..........
				
				
				
so it may be due to the EXIF meta data stored with your images on your phone which causes the uploader to rotate the image.
this is in: admin/view/javascript/filemanager/UploadHandler.php

Active Member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by JNeuhoff » Thu Jan 16, 2025 6:46 pm

nonnedelectari wrote:
Thu Jan 16, 2025 11:33 am
so it may be due to the EXIF meta data stored with your images on your phone which causes the uploader to rotate the image.
this is in: admin/view/javascript/filemanager/UploadHandler.php
There is no such file in OpenCart 3.0.4.0 !

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Thu Jan 16, 2025 6:49 pm

Cue4cheap wrote:
Thu Jan 16, 2025 4:07 am
My first thought is to look at them on the computer and adjust them.
Mike
Yep, just do this.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Mariogs » Thu Jan 16, 2025 8:22 pm

JNeuhoff wrote:
Thu Jan 16, 2025 6:46 pm
nonnedelectari wrote:
Thu Jan 16, 2025 11:33 am
so it may be due to the EXIF meta data stored with your images on your phone which causes the uploader to rotate the image.
this is in: admin/view/javascript/filemanager/UploadHandler.php
There is no such file in OpenCart 3.0.4.0 !
viewtopic.php?t=234114

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by Mariogs » Thu Jan 16, 2025 8:25 pm

???
2025-01-16 13_13_57-20241204_104330.jpg.png
Cue4cheap wrote:
Thu Jan 16, 2025 4:07 am
Mariogs wrote:
Thu Jan 16, 2025 3:53 am
I made some photos with my samsung phone.
And when I open that on my PC are all portrait but imediatelly when I upload it to opencart are all landscape.
I use opencart 3.0.4.0.
How to solve that so pictures are in position as they are made - portrait?
When you took them were they in landscape or portrait?
When you look at them on the computer are they landscape or portrait?
How are you uploading them to the site?

My first thought is to look at them on the computer and adjust them.
Mike
When I doubleclick on picture on my PC it opens and it is as it should be.
Picture is created portrait.
Funny is that picture created landscape are OK.
I upload it when I start to creating new product for selling in picture setting I upload it. It is print screen at first post.
width of picture is 3000 pixels
and height is 4000 pixela

Attachments

???
2025_01_16_13_16_36_20241204_104330.jpg_lastnosti.png

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by Mariogs » Thu Jan 16, 2025 8:29 pm

paulfeakins wrote:
Thu Jan 16, 2025 6:49 pm
Cue4cheap wrote:
Thu Jan 16, 2025 4:07 am
My first thought is to look at them on the computer and adjust them.
Mike
Yep, just do this.
Adjust them how?? they are already portrait, everywhere I look.

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by Mariogs » Thu Jan 16, 2025 8:36 pm

nonnedelectari wrote:
Thu Jan 16, 2025 11:33 am
Not sure if it is this but the upload handler of the filemanager in admin has this:

Code: Select all

			'image_versions' => array(
				// The empty image version key defines options for the original image:
				// Keep in mind that these options are inherited by all other image versions!
				'' => array(
					// Automatically rotate images based on EXIF meta data:
					'auto_orient' => true
				),
				..........
				
				
				
so it may be due to the EXIF meta data stored with your images on your phone which causes the uploader to rotate the image.
this is in: admin/view/javascript/filemanager/UploadHandler.php
there is no folder "filemanager". I have add print screen of my folders

Attachments

???
2025-01-16 13_35_56-javascript - root@194.249.178.141 - WinSCP.png

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by JNeuhoff » Thu Jan 16, 2025 9:11 pm

That's what I thought. What @nonnedelectari quoted simply doesn't exist in a standard OC 3.0.4.0, not sure where he gets it from.

But it seems you have installed some extensions from purpletree which may have modified the filemanager.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Mariogs » Fri Jan 17, 2025 2:21 am

JNeuhoff wrote:
Thu Jan 16, 2025 9:11 pm
That's what I thought. What @nonnedelectari quoted simply doesn't exist in a standard OC 3.0.4.0, not sure where he gets it from.

But it seems you have installed some extensions from purpletree which may have modified the filemanager.
I tested it before I installed purpletree and it was the same

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by khnaz35 » Fri Jan 17, 2025 9:15 am

Attach one of the those images here.

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by nonnedelectari » Fri Jan 17, 2025 9:28 am

JNeuhoff wrote:
Thu Jan 16, 2025 6:46 pm
nonnedelectari wrote:
Thu Jan 16, 2025 11:33 am
so it may be due to the EXIF meta data stored with your images on your phone which causes the uploader to rotate the image.
this is in: admin/view/javascript/filemanager/UploadHandler.php
There is no such file in OpenCart 3.0.4.0 !
sorry about that, was from an extention I have, not default OC.

Active Member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by nonnedelectari » Fri Jan 17, 2025 9:35 am

Still, you could search your admin side source php files for "exif_read_data", and see if that php function is used anywhere or just "exif" in php and js files.
If it is done server-side, the exif data has to be read somewhere.
If not, it might also just be your phone which does this while uploading?

Active Member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by Mariogs » Fri Jan 17, 2025 4:35 pm

JNeuhoff wrote:
Thu Jan 16, 2025 9:11 pm
That's what I thought. What @nonnedelectari quoted simply doesn't exist in a standard OC 3.0.4.0, not sure where he gets it from.

But it seems you have installed some extensions from purpletree which may have modified the filemanager.
why do you saying it doesn't exist? here is print screen from opencart extensions page.

Attachments

???
2025-01-17 09_31_40-Opencart extensions – Mozilla Firefox.png

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by Mariogs » Fri Jan 17, 2025 4:41 pm

JNeuhoff wrote:
Thu Jan 16, 2025 9:11 pm
That's what I thought. What @nonnedelectari quoted simply doesn't exist in a standard OC 3.0.4.0, not sure where he gets it from.

But it seems you have installed some extensions from purpletree which may have modified the filemanager.
that folder doesn't exist in instalation files and folders it looks like 3.0.4.0 doesn't have it anymore. Here is print screen from installation folders

Attachments

???
2025-01-17 09_38_51-javascript.png

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by Mariogs » Fri Jan 17, 2025 4:48 pm

khnaz35 wrote:
Fri Jan 17, 2025 9:15 am
Attach one of the those images here.
here they are.

Attachments

???
20241217_124341.jpg
???
20241216_092650.jpg
???
20241204_104330.jpg

New member

Posts

Joined
Mon Dec 02, 2024 12:53 am

Post by by mona » Fri Jan 17, 2025 4:58 pm

Orientation and mobiles is an issue - Orientation and Opencart is not.

It would very much appear the issue is with uploading directly from your phone.
In addition the imagine sizes from your phone greatly exceed the recommended images sizes for a website.
If you search google you can find lots of information regarding orientation and mobile - search for your exact model and you may find there is a setting in your phone.

As is correct practice anyway - you should be compressing your images before uploaing.
There are many online sites that do this for free - as an example - https://tinypng.com/
Since they create new images they probably do not include the image data from your phone that appears to be causing you a problem.

If that site doesnt work - try another online compressor.
There is nothing anyone can offer here for your phones including data. Opencart does not edit orientation and you say your theme is not the issue either - so that leaves your phone or some extension.

There is no easy solution if some of your images are landscape and some portrait. Opencart resizes everything to fit cached preset sizes, unless your theme / extensions mess with that.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by by mona » Fri Jan 17, 2025 5:15 pm

Here are some solutions, using tinypng.

Attachments

20241217_124341-4 (1).jpg

20241217_124341-4 (1).jpg (33.06 KiB) Viewed 883 times

20241217_124341-4.jpg

20241217_124341-4.jpg (36.44 KiB) Viewed 883 times


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: lockiedownunder, maffe and 90 guests