Method showImage()

public function showImage() {
    //...your PHP code...//


Allows you to generate an image for download or for display using your module.


No context is provided automatically. You must provide any context yourself in the GET request.

Where You Can Use It

From Zenario 7.0.0 onwards.


You should write a showImage() method if you want your Plugin to generate images.

You should send appropriate headers, then output the contents of the file.

Return Value

No return value is needed.


public function showImage() {
    header('Content-Type: image/jpeg');

This offers a file called myimage.jpg for download. (Note that this is just a simple example; you would probably want to store images in a database table to make showFile useful.