Img orientation not correct

When I invoke a user function to display an img, it sometimes displays as rotated. Chrome displays it correctly. What’s going on, how do I fix this?

Do you have screenshots and source code of the function you were talking about? Just saying plainly is hard for me to get the idea :smiley: