$media->dimensions()

Returns the $dimensions object for the file. This is only available for images (jpg, png, gif)

  • return ($dimension)

Example

$dimensions = $media->dimensions();

echo $dimensions->width();
echo $dimensions->height();

Is something missing or incorrect? Edit this page on Github…