php / php/doc-en

getimagesize() does not account for EXIF orientation

Open
#2,745 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
XML
Stars
596
Forks
890
Avg merge
1d 15h
Merged PRs (30d)
55

Description

From manual page: https://php.net/function.getimagesize

I believe the return array indices 0 and 1 are intended to be reversed.

Currently, index 0 is returning image height, while index 1 is returning image width.

I believe that index 3 is expecting the same logic reversal, as it produces a string "width="[0]" height="[1]"" -- the height value is being printed in the width attribute and the width value is being printed in the height attribute.


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the getimagesize() manual page linked in the report and compare the documented return-array indices 0, 1, and 3 with the reported width and height behavior. Confirm the intended ordering, then update the relevant documentation so the return values and generated attribute string describe width and height consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.