tigron / skeleton-file-picture
Tigron File utilities
v0.2.27
2026-09-15 12:50 UTC
Requires
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- v0.2.27
- v0.2.26
- v0.2.25
- v0.2.24
- v0.2.23
- v0.2.22
- v0.2.21
- v0.2.20
- v0.2.19
- v0.2.18
- v0.2.17
- v0.2.16
- v0.2.15
- v0.2.14
- v0.2.13
- v0.2.12
- v0.2.11
- v0.2.10
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- 0.1.1
- v0.1.0
- v0.0.2
- v0.0.1
- dev-feature/move-resize-convert-to-manipulation
This package is auto-updated.
Last update: 2026-09-16 10:35:50 UTC
README
Description
This library can resize images. The image must be of type \Skeleton\File\File
Installation
Installation via composer:
composer require tigron/skeleton-file-picture
Create a new table in your database:
CREATE TABLE IF NOT EXISTS `picture` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`file_id` int(11) NOT NULL,
`width` int(11) NOT NULL,
`height` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `file_id` (`file_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
Howto
Check the \Skeleton\File README to initialize the File Store
Initialize the picture library:
/**
* This function adds a picture configuration
*
* $params = [
* 'width' => width in px,
* 'height' => height in px
* 'mode' => exact/crop/auto
* exact => The $height/$width will be used, ratio is ignored
* crop => The image is cropped in in order to fill the $height/$width frame
* auto => The image is resized to fit the $height/$width frame, ratio is kept
* 'format' => image/jpeg|image/gif|image/png|image/webp|original
*/
\Skeleton\File\Picture\Config::add_configuration($params);
/**
* Set the cache path
* This is default set to the system TMP path
*
* \Skeleton\File\Picture\Config::$tmp_dir is deprecated
*/
\Skeleton\File\Picture\Config::$tmp_path = $your_very_temporary_path
Show a resized picture:
$picture = Picture::get_by_id(1);
$picture->resize($configuration_name);