Jump to content
TNG Community
bresner

photos are warped when uploading

Recommended Posts

bresner

Hi,

sometimes when I upload photos to my TNG the phots are warped. Interestingely, when I open them on my computer they're normal.
The automatically created thumbnail has the right proportions see Screenshot1, but when I open it it's warped (Screenshot2).

Has anybody else had that issue and knows how to solve that?

Thank you in advance!
Fabio

P.S. my TNG runs on version 13.0.4

Screenshot1.jpgScreenshot2.jpg

Share this post


Link to post
Share on other sites
Chris Lloyd

looks like a viewport width issue to me

 

Share this post


Link to post
Share on other sites
bresner

Do you have any clue how to fix that? Interestingly, it doesn' appear with every picture, just with some.

Share this post


Link to post
Share on other sites
theKiwi

Can you post a link to a page where this problem can be seen?

Roger

Share this post


Link to post
Share on other sites
theKiwi

That is quite odd - the image is 1576x999 pixels, but it's being displayed as 999x1576 - so the x and y dimensions are being reversed.

Do you have any Mods installed? If so, try uninstalling all of them, and see if the problem persists - if not, install the Mods back one at a time and see which one changes it.

You could try uploading a fresh set of all of the files in the js folder for TNG 13.0.4

Or download and install the latest update for TNG 13.1.1 - it's a free upgrade since you already have 13.0.4

Roger

Share this post


Link to post
Share on other sites
bresner

Hi Roger,

I have installed several mods. I will try uninstalling all of them and look if one of them causes the problem.

Thank you!

Share this post


Link to post
Share on other sites
bresner

Hi Roger,

I uninstalled all Mods and also updated TNG to 13.1.1, but the issue is still there. I also tried to reupload that file, but it it's still displayed wrong.

Share this post


Link to post
Share on other sites
bresner

I tried to upload it as PNG and this seems to work 🤔 at least that does work, but I's a bit unsatisfiying that it doesn't work with JPGs properly. 🤔

Share this post


Link to post
Share on other sites
Philip Roy

I'm curious now also 😉 Can you link to another example of an image that is warped? Or DM me a copy of the JPG? I thought I'd try and see what happens on my site....and also look at the metadata of the file (just a complete guess) to see if it corrupt somehow?

Share this post


Link to post
Share on other sites
bhemph

There were a couple of changes in TNG with image orientation determination for different items.  As Phil says, we would be interested to know about the original file and be able to determine the cause.  Because like you say it is unsatisfying that it isn't working correctly with JPGs properly.

Share this post


Link to post
Share on other sites
theKiwi

I wonder if you were to have opened the .jpg file and then saved it again as a jpg file - would that file have still had the issue or not?

Roger

Share this post


Link to post
Share on other sites
Philip Roy

That's what I'm speculating also....that maybe it's a PNG file that was just given a JPG extension and that caused issues...or it's slightly corrupt and resaving it might resolve the issue. That's why I was keen to access a file.

Share this post


Link to post
Share on other sites
klooster

I cannot replicate your problem, the photo shows correct dimensions  (Chrome and Safari browser).  The  thumbnail has the right proportions and it's not warped, see screenshots

Schermafbeelding_2022-01-17_om_07_13_52.png

Schermafbeelding 2022-01-17 om 07.15.27.png

Share this post


Link to post
Share on other sites
Philip Roy

Probably because you’re now seeing the PNG version that appears to resolve the issue…hence why some of us are asking for a copy of the JPG file to do some investigating.

Share this post


Link to post
Share on other sites
bresner

Hi all together,

yes, there's another picture what that issue appears:
https://ahnenforschung.curman.at/showmedia.php?mediaID=245&medialinkID=379

I attached it here, so that everyone of you can access it. I scanned that image some days ago and it's originally a JPEG, has never been a PNG and just renamed it to a JPEG. I asked two colleagues days ago if they have the same issue, both said no, but suddenly yesterday one of them said it doesn't work on his site either. There are also height and width are also reversed.

Thank you all for your help!

P.S. the family picture just works because I exported the JPG in IrfanView as PNG and uploaded that one.

IMG_20211231_0010.jpg

Share this post


Link to post
Share on other sites
Philip Roy

So I went to the link you provided, logged in with the username and password you provided...and then waited...and waited.

I think the issue is that you are uploading massive image files and expecting something "web related" to happen where the best possible image gets displayed.....but that's a HUGE image file.

Screen Shot 2022-01-17 at 9.05.17 PM.png

 

My personal philosophy (others may disagree) is...

  •  Keep a copy of the utmost best image that you have locally
  • For TNG save all files as JPG
  • Never use an image that is greater than either 1600px wide...or tall

Again...that's just me...but that is the design decisions that I have made. I have to say, in a long career involving web design...I have NEVER uploaded an image that big in dimension and file size.

Why? Think of the end user....they have to wait (as I did) for that huge file to download and fill the screen. TNG (as most web systems) doesn't do anything clever to download a smaller version.

So...I'd suggest you start by saving a JPG version that is smaller in dimension and file size and see how you get on.

That said, this bit still confuses me....

Quote

 it's originally a JPEG, has never been a PNG and just renamed it to a JPEG

You should never just rename a file to change its format. That won't actually work.

Share this post


Link to post
Share on other sites
klooster

Yes that's the reason I think, the dimensions of your photo far exceed the dimensions of the Imageviewer. If I look at the sourcode of the page it shows:

<img id="theimage" src="photos/IMG_20211231_0010%20-%20Kopie.jpg" usemap="#imgMapViewer" width="1831" height="1237" style="position: relative; border: 0px; top: 0px; left: 0px;">

The original dimensions of that photo are  4096 x 6064

So, like Philip suggested: only upload photo's that are smaller in dimension and file size, with a maximum of width="1831" height="1237"

 

Share this post


Link to post
Share on other sites
bresner

Hi!

Thank you for your help, I immediately tried that and minimized it to a height of 1200, seems to work! So in future I'll first minimize the image and then upload it.

Thanks again!

Share this post


Link to post
Share on other sites
Philip Roy

Cool! As mentioned…I decided that no image of mine would be greater than 1600 pixels across or down…and saving as a JPG where each image is less than 1 MB… Which solves any issues in terms of generating thumbnails etc with my hosting provider.

Share this post


Link to post
Share on other sites
Rob Roy
5 hours ago, Philip Roy said:

My personal philosophy (others may disagree) is...

  •  Keep a copy of the utmost best image that you have locally
  • For TNG save all files as JPG
  • Never use an image that is greater than either 1600px wide...or tall

Well, seems the Roy's here think alike with minor variations.  On important family photos, I save the original, but in TNG the smallest width is set to 1200 and is always a JPG.  BTW on the originals, they are saved as a TIFF. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×