Skip to content

Instantly share code, notes, and snippets.

@bastianallgeier
Last active October 7, 2015 12:27
Show Gist options
  • Save bastianallgeier/31417e977cf256d2c739 to your computer and use it in GitHub Desktop.
Save bastianallgeier/31417e977cf256d2c739 to your computer and use it in GitHub Desktop.
<img src="<?php $page->image()->crop(300, 200)->url() ?>" alt="Cropped by width and height">
<img src="<?php $page->image()->crop(300)->url() ?>" alt="Cropped box">
<img src="<?php $page->image()->resize(300, 200)->url() ?>" alt="Resized by width and height">
<img src="<?php $page->image()->resize(300)->url() ?>" alt="Resized by width only">
<img src="<?php $page->image()->resize(false, 200)->url() ?>" alt="Resized by height only">
<img src="<?php $page->image()->resize(300, 200, 80)->url() ?>" alt="Resized and reduced quality">
<img src="<?php $page->image()->crop(300, 200, 80)->url() ?>" alt="Cropped and reduced quality">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment