Image::filesize

Gets file size of the current image

2.8M Downloads / Month

Open Source MIT License

You are viewing the documentation for Intervention Image 2, this version has reached EOL. Please consider upgrading to version 3.

public Intervention\Image\Image filesize()

Gets the file size for the current image, if instance is initiated from an actual file.

Parameters

none

Return Values

Returns the size of the image file in bytes or false if image instance is not created from a file.

Examples

// create an image
$img = Image::make('public/foo.jpg');

// get file size
$size = $img->filesize();
Edit