PHPackages                             jellybellydev/image-orientation-fix - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. jellybellydev/image-orientation-fix

ActiveLibrary[Image &amp; Media](/categories/media)

jellybellydev/image-orientation-fix
===================================

PHP library to fix image orientation by exif data.

v3.2.1(2y ago)1810.8k↓41.2%2MITPHPPHP ^7.4|^8.0

Since Feb 26Pushed 1y ago3 watchersCompare

[ Source](https://github.com/JellyBellyDev/ImageOrientationFix)[ Packagist](https://packagist.org/packages/jellybellydev/image-orientation-fix)[ Docs](http://github.com/JellyBellyDev/ImageOrientationFix)[ GitHub Sponsors](https://github.com/JellyBellyDev)[ RSS](/packages/jellybellydev-image-orientation-fix/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (10)Used By (0)

ImageOrientationFix
===================

[](#imageorientationfix)

PHP library to fix image orientation by exif data with thanks to method [exif\_read\_data](http://it2.php.net/manual/en/function.exif-read-data.php)

[![Gitbub actions](https://github.com/JellyBellyDev/ImageOrientationFix/workflows/Build/badge.svg)](https://github.com/JellyBellyDev/ImageOrientationFix/actions)[![Latest Stable Version](https://camo.githubusercontent.com/3bdf64d10f852a9025c2f18780000612068da00ca2c02f6f1043a6e592b0debb/68747470733a2f2f706f7365722e707567782e6f72672f6a656c6c7962656c6c796465762f696d6167652d6f7269656e746174696f6e2d6669782f762f737461626c65)](https://packagist.org/packages/jellybellydev/image-orientation-fix)[![PHP Version Require](https://camo.githubusercontent.com/f9a9b61c22d6674f09822b5d5b30a2c2b1ca47d19d1c24fc3074ab24d5f7048f/687474703a2f2f706f7365722e707567782e6f72672f6a656c6c7962656c6c796465762f696d6167652d6f7269656e746174696f6e2d6669782f726571756972652f706870)](https://packagist.org/packages/jellybellydev/image-orientation-fix)[![Total Downloads](https://camo.githubusercontent.com/524354c0bfd238412d2130ad004010f08434c720f5f00ec125e29d6add3c3a11/68747470733a2f2f706f7365722e707567782e6f72672f6a656c6c7962656c6c796465762f696d6167652d6f7269656e746174696f6e2d6669782f646f776e6c6f616473)](https://packagist.org/packages/jellybellydev/image-orientation-fix)[![composer.lock](https://camo.githubusercontent.com/3e37f04ac5599ed94a329710890b4e812390dc96e433dc3c086c71b926b35749/68747470733a2f2f706f7365722e707567782e6f72672f6a656c6c7962656c6c796465762f696d6167652d6f7269656e746174696f6e2d6669782f636f6d706f7365726c6f636b)](https://packagist.org/packages/jellybellydev/image-orientation-fix)[![License](https://camo.githubusercontent.com/665f15798988793ef4e912bc1a52a3a8f299319d7cccad125ce6e09d940bf5f1/68747470733a2f2f706f7365722e707567782e6f72672f6a656c6c7962656c6c796465762f696d6167652d6f7269656e746174696f6e2d6669782f6c6963656e7365)](https://packagist.org/packages/jellybellydev/image-orientation-fix)[![codecov](https://camo.githubusercontent.com/0f037bd7c588181d4b6fb3445a9c325f6f3c204c8b979748c00d30b2e22e1895/68747470733a2f2f636f6465636f762e696f2f67682f4a656c6c7942656c6c794465762f496d6167654f7269656e746174696f6e4669782f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/JellyBellyDev/ImageOrientationFix)

Image Example
-------------

[](#image-example)

[![after](images/after_and_before.png)](images/after_and_before.png)

How to install
--------------

[](#how-to-install)

```
composer require jellybellydev/image-orientation-fix
```

How to use
----------

[](#how-to-use)

```
use ImageOrientationFix\ImageOrientationFixer;

$iof = new ImageOrientationFixer('foo.jpg');
$iof->fix();
```

or

```
use ImageOrientationFix\ImageOrientationFixer;

$iof = new ImageOrientationFixer('/path/foo.jpg', '/path/foo_fixed.jpg');
$iof->fix();
```

Contributing
------------

[](#contributing)

Dependencies are managed through composer:

```
$ docker-compose up --build -d
$ docker-compose run php74 composer install

```

### Run phpunit:

[](#run-phpunit)

```
$ docker-compose run php74 composer test

```

### Run php-cs-fixer

[](#run-php-cs-fixer)

```
docker-compose run php74 composer cs-fixer
```

Changelog
---------

[](#changelog)

Please refer to the [changelog notes](CHANGELOG.md).

Credits
-------

[](#credits)

Thanks to [recurser](https://github.com/recurser) for the [image example](https://github.com/recurser/exif-orientation-examples)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~267 days

Recently: every ~295 days

Total

9

Last Release

864d ago

Major Versions

1.x-dev → v2.0.02020-03-15

v2.0.0 → v3.0.02020-10-11

PHP version history (4 changes)1.0.0PHP &gt;=5.2.4

v2.0.0PHP ^7.1

v3.0.0PHP ^7.4

v3.1.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8dab7be39a6adf2b47f924eed2d1cc45b1e37e292557f4395961a00651d3bff5?d=identicon)[JellyBellyDev](/maintainers/JellyBellyDev)

---

Top Contributors

[![JellyBellyDev](https://avatars.githubusercontent.com/u/190820?v=4)](https://github.com/JellyBellyDev "JellyBellyDev (75 commits)")

---

Tags

auto-rotateexifexif-datahacktoberfestimage-orientationlandscapephpphp-libraryportraitimageexifrotateorientationLandscapeexif\_read\_dataauto-rotateauto-adjustportraitImageOrientationFix

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/jellybellydev-image-orientation-fix/health.svg)

```
[![Health](https://phpackages.com/badges/jellybellydev-image-orientation-fix/health.svg)](https://phpackages.com/packages/jellybellydev-image-orientation-fix)
```

###  Alternatives

[masterexploder/phpthumb

A library for manipulating images in PHP.

981751.7k17](/packages/masterexploder-phpthumb)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860918.1k11](/packages/sybio-image-workshop)[fileeye/pel

PHP Exif Library. A library for reading and writing Exif headers in JPEG and TIFF images using PHP.

197.1M2](/packages/fileeye-pel)[frameright/image-metadata-parser

Image metadata parsing library

1133.9k](/packages/frameright-image-metadata-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
