Class: \Conifer\Post\Image

Custom Image class for maintaining image sizes. Image sizes/dimensions are more easily retrievable when declared via this class.

Visibility Function
public static add_size(string $name, int $width, bool/int $height=false, bool/boolean $crop=false)</strong> : void
Thin wrapper around add_image_size(). Remembers arguments so that the newly declared size can be looked up later using get_sizes().
public aspect() : mixed image aspect ratio as a float, or null if the image does not exist
Get the aspect ratio of the underlying image file.
public static get_size(array $size)</strong> : array
Get dimension info for the custom image size $size
public static get_sizes() : array
Get all images sizes, including default ones
public height(bool/string $customSize=false)</strong> : int
Get the declared height of this image, optionally specific to the image size $size
public width(bool/string $customSize=false)</strong> : int
Get the declared width of this image, optionally specific to the image size $size

This class extends \Timber\Image

This class implements \Timber\CoreInterface

results matching ""

    No results matching ""