<img> unwanted photo rotation

I have an image embedded in a table using HTML5. The image rotates automatically 90 degrees counterclockwise, and CSS is not applied, not Javascript (there used to be tags classon some tags, but I commented on the block <style></style>in <head>.

The image was created by a PHP script w / Imagick to reduce it from the original image, but the original image still had the same problem.

the code:

<table>
    <tr>
        <th>$username has sent you a photo!</th>
    </tr>
    <tr>
        <td>
            <img src="IMG_1314_MOD.jpg" width="300" height="225" class="rotate90"/>
        </td>
    </tr>
    <tr>
        <td><div class="caption">$caption</div></td>
    </tr>
</table>

I tried using CSS code in this answer and applied it to <img>, but when it turned around, it did not adjust the table and did not close the text.

Does anyone know which solution I could use?

- EDIT -

EXIF ​​ PHP print_r() EXIF ​​ , , , . Pastebin , , .

+4
3

jhead -autorot JPG-. , , , .

, , reset , .

http://www.sentex.net/~mwandel/jhead/usage.html

( : , script .)

+5

[Orientation] => 6 , 1

0

if you are using vue.js, you can simply use this vue directive to fix the img incorrect orientation.

Check example: Fix Img Orientation

Github repository: vue-img-direction-changer

0
source

All Articles