📊 State of Magento 2025

The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

613 Modules
401 Ready
211 Need Help
🏆 Leaderboard
Potentially Abandoned v1.0.7

Module Image

swissup/module-image

Calculates image dimensions (width and height) using PHP. Supports various image formats and falls back to a fast image size library if needed.

142,015
Downloads
Below average
2
GitHub Stars
Below average
3y ago
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
14 warnings
L1 PHPStan

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.7 on Magento 2.4.8-p3
Dec 27, 2025

Share This Module's Status

Module Image Magento compatibility status badge

README

Loaded from GitHub

swissup/module-image

swissup/module-image - is a Magento module to calculate image dimensions using PHP. It uses getimagesize function when image is found in filesystem, otherwise uses fallback to marc1706/fast-image-size library. Supported formats: bmp, gif, ico, iff, jp2, jpeg, png, psd, svg, tif, wbmpm, webp.

Installation

composer require swissup/module-image
bin/magento setup:upgrade

Usage

use Swissup\Image\Helper\Dimensions;

$this->dimensions->getWidth($imageUrl);      // 600
$this->dimensions->getHeight($imageUrl);     // 400
$this->dimensions->getDimensions($imageUrl); // ['width' => 600, 'height' => 400]

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.