$file->width()

Returns the width of image files in pixels

  • return (integer)

Example

<?php echo $page->image()->width(); ?>

2.3.0 +

Resizing the width

By passing a value, you can also use the $file->width() method to resize the image by width:

echo $page->image('my-image.jpg')->width(300);