nexuslinkservices / image-size-finder
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/nexuslinkservices/image-size-finder
Requires
- php: >=5.6.2
Requires (Dev)
- phpunit/phpunit: 5.5.*
- symfony/yaml: ~2.3|~3.0
This package is not auto-updated.
Last update: 2025-10-12 01:18:58 UTC
README
Extension to get image details with size, height,width and valid flag value by mininum/maxinum size given in configuration.
Installation
If you use composer, you can add this package by running
composer require galiteintechnologies/image-size-finder
Usage
Set minimum and maximum value in bytes in configuration file. like this
image_size:
minimum: 100
maximum: 900
If you do not create configuration file it will from package.
<?php
use ImageSizeFinder\PictureParser;
$pictureParser = new PictureParser();
$images = ['https://raw.githubusercontent.com/nexuslinkservices/image-size-finder/master/web/samples/sample_image.png'];
$imageDetails = $pictureParser->fetchSize($images);
var_dump($imageDetails[0]);
Output
array = [
"url"=> "https://raw.githubusercontent.com/nexuslinkservices/image-size-finder/master/web/samples/sample_image.png",
"size"=> 82966,
"height"=> 512,
"width"=> 512,
"valid"=> true
];
CONTRIBUTING:
Pull requests are always welcome.