Frontend | Backend | Api

Files\Models\Backend\Image

Image

Method Description Returns
getPath() Get the path for this image string
getFullPath() Get the full path for this image. Alias for getPath. string
getHtml(array $attributes) Get the html image tag for this image string
getResized(?int|null $width, ?int|null $height, string $resizeStrategy) Get a resized version of the active revision of the image Tries to fetch the image first, otherwise will create and return it Will save the resized copy and potentially also the current image, if the dimensions were not determined previously Image
getMimeType() Get the mime type of the image string
getFormat() Get the format of the image string
isBlank() Return the information that this is not a blank image bool
getType() Get the type of the image. Always returns "image". string
getWidth() int
getHeight() int
getAspectRatio() float
getName() string
getId() int
getFilename() Filename
getCreated() Get the date the record was created. DateTime
getModified() Get the last modification date for the record. DateTime
getActiveRevision() ImageRevision
getRevisionById(int $id) Get the revision with the specified id ImageRevision
getRevisions() Collection (ImageRevision)
getLastRevision() Get the last revision for the entity. If a revision has been added, this will be the newly added revision. ImageRevision
getTags() Collection (Tag)
getCategories() Collection (Category)
isNewRecord() Check if the record is a new record bool
isHierarchicalModel() Check whether a model is a hierarchical model, i.e. can have children bool
isVersionedModel() Check whether a model is versioned bool
getDropzoneConfig() Get the dropzone config for this image array