Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

ImageSize.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\IO\MetadataHandler;
8
9 use eZ\Publish\Core\IO\MetadataHandler;
10
14 class ImageSize implements MetadataHandler
15 {
16 public function extract($filePath)
17 {
18 $metadata = getimagesize($filePath);
19
20 return [
21 'width' => $metadata[0],
22 'height' => $metadata[1],
23 // required until a dedicated mimetype metadata handler is added
24 'mime' => $metadata['mime'],
25 ];
26 }
27 }
eZ\Publish\Core\IO\MetadataHandler\ImageSize
Definition: ImageSize.php:15
eZ\Publish\Core\IO\MetadataHandler\ImageSize\extract
extract($filePath)
Extracts metadata for the file identified by $path.
Definition: ImageSize.php:16
eZ\Publish\Core\IO\MetadataHandler
Definition: MetadataHandler.php:13
eZ\Publish\Core\IO\MetadataHandler
Definition: ImageSize.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.