Image
Single image entity
Properties
ID
Post ID
int
alt
Return alt value
string
cache_path
Only for remote image, return cache path
string
caption
Return caption value
string
description
Post content
string
extension
File extension (.jpg, .png, ... )
string
file
Return relative file path
string
file_content
Return file content, usefull for svg
string
height
Image height
int
link
Return image link
string
meta(name)
Get post meta
mixed
custom_fields(name)
Get ACF value
mixed
mime_type
Image mime type
string
filesize
Return image file size in bytes
int
src
Return image src
string
title
Image title
string
width
Image width
int
Examples
Process remote image
Allowed mime type : image/jpeg, image/jpg, image/gif, image/png
Invalidate image cache ( for remote )
Remote image are stored in cache for 30 days, in a controller or an action, you can force cache invalidation
Resize an image
Resize an image, and apply filters
Filter list
Resize implements Image intervention methods
gcd
resize
insert
colorize
blur
flip
brightness
invert
mask
gamma
rotate
text
pixelate
greyscale
rectangle
circle
limitColors
Generate an image placeholder
Generate a transparent image pixel in base64
Generate a placeholder image using https://placehold.jp
Generate an advanced picture template
Return resized and compressed picture HTML
Output
Last updated
Was this helpful?