Print PDF from page rotate picture

I am using the SelectPDF for printing pages. It works fine even when I upload a picture.
But what is the best approach to handle if the picture is turned sideways.
I tried:
Rotate by 90 degrees if height < width - doesn’t seem to work.
Rescale - rendering option - actually prints it sideways with white stripes on the side.

Has anybody build something in bubble to print pictures in proper aspect?

OK, I know what is my issue.
The select PDF needs to say if the picture is rotated or not, And I cannot extract this information as I save the picture as a file(not picture) via backend workflow. Is there a plugin to extract this information?
I need to add - this is saved as file, not as image, so bubble doesn’t treat it as such for some reason.