Skip to content

Configuration options

David Mongeau-Petitpas edited this page Mar 29, 2015 · 4 revisions

You can configure Image by editing the options in the config/image.php file.

Here is a list of all possible options:

driver

  • Value: 'gd' or'imagick' or 'gmagick'
  • Default: 'gd'

The driver that should be used by the Imagine library to manipulate the images.

--

host

  • Value: string
  • Default: ''

The http host where the image are served. Used by the Image::url() method to generate the right URL.

--

src_dirs

  • Value: array
  • Default: array(public_path())

A list of directories to look for images

--

url_parameter

  • Value: string
  • Default: '-image({options})'

The URL parameter that will be appended to your image filename containing all the options for image manipulation. You have to put {options} where you want options to be placed. Keep in mind that this parameter is used in an url so all characters should be URL safe.

--

url_parameter_separator

  • Value: string
  • Default: '-'

The URL parameter separator is used to build the parameters string that will replace {options} in url_parameter

--

serve_image

  • Value: boolean
  • Default: true

If true, a route will automatically be added to catch request to image containing the URL parameter above.

--

serve_custom_filters_only

  • Value: boolean
  • Default: false

Restrict options in url to custom filters only. This prevent direct manipulation of the image.

--

write_image

  • Value: boolean
  • Default: false

When serving an image, write the manipulated image in the same directory as the original image so the next request will serve this static file