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.
No errors foundPHPStan level 1Build passingTrusted vendorSemVer compliant
Supported Magento versions: 2.4.9
160,988 installs★ 2 starsLatest: v1.0.7Released 2023-04-21License: MIT
composer require swissup/module-imageREADME
Reproduced from the package’s own README, under its own license, as of 2026-09-13. Links and images point back at the source repository.
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.
composer require swissup/module-image bin/magento setup:upgrade
use Swissup\Image\Helper\Dimensions; $this->dimensions->getWidth($imageUrl); // 600 $this->dimensions->getHeight($imageUrl); // 400 $this->dimensions->getDimensions($imageUrl); // ['width' => 600, 'height' => 400]
Links
- Packagist
- PackageMaven — quality data by PackageMaven
- Repository
- Issues