response — Attach image to new HTTP response

    Sends HTTP response with current image in given format and quality.

    • jpg — return JPEG encoded image data
    • png — return Portable Network Graphics (PNG) encoded image data
    • gif — return Graphics Interchange Format (GIF) encoded image data
    • tif — return Tagged Image File Format (TIFF) encoded image data

    By default the response data will be encoded in the type of the current image. If no image type is defined yet, method will return jpeg encoded data.

    quality (optional)

    Encoded image data after raw HTTP header is sent. If you are in a Laravel framework environment the method will return a Illuminate\Http\Response with the corresponding header fields already set.

    Basic Example

    Laravel Example