Download the PHP package hcesrl/php-responsive-image-sizes without Composer
On this page you can find all versions of the php package hcesrl/php-responsive-image-sizes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download hcesrl/php-responsive-image-sizes
More information about hcesrl/php-responsive-image-sizes
Files in hcesrl/php-responsive-image-sizes
Download hcesrl/php-responsive-image-sizes
More information about hcesrl/php-responsive-image-sizes
Files in hcesrl/php-responsive-image-sizes
Vendor hcesrl
Package php-responsive-image-sizes
Short Description Retrieve the correct sizes for a responsive image based on its intrinsic width and its width on screen
License MIT
Package php-responsive-image-sizes
Short Description Retrieve the correct sizes for a responsive image based on its intrinsic width and its width on screen
License MIT
Please rate this library. Is it a good library?
Informations about the package php-responsive-image-sizes
Responsive image sizes library ported to PHP
Installation
composer require hcesrl/php-responsive-image-sizes
Usage
Please refer to the original javascript library documentation for further informations: https://github.com/HCESrl/responsive-image-sizes
Here is a basic example:
ResponsiveImagesSizes::getResponsiveSizes function accepts following parameters:
- $deviceType enum value: one of the available Enum DeviceType values (based on
marc-mabe/php-enumlibrary); - BaseSizes class instance: the constructor expects one of the available Enum BaseSizesType values (based on
marc-mabe/php-enumlibrary). If you chooseBaseSizesType::Custom()value, a second parameter is expected (see below); - $sourceImageWidth integer, default is 3220, see js library docs for further informations;
- $widthOnPage integer, default is 100, see js library docs for further informations;
- $topSize integer, default is 1920, see js library docs for further informations;
if you want to use a custom set of BaseSizes, you should declare an array that matches the following schema, and use it as second BaseSizes class constructor's argument:
Example:
Output sample:
All versions of php-responsive-image-sizes with dependencies
PHP Build Version
Package Version
The package hcesrl/php-responsive-image-sizes contains the following files
Loading the files please wait ...