ImageSizer class

Located in file /wire/core/ImageSizer.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the ImageSizer class also inherits all the methods and properties of: Wire.

Show class?             Show args?        

Common

NameReturnSummary 
ImageSizer::convertToGreyscale()
boolConvert image to greyscale (black and white) 
ImageSizer::convertToSepia()
boolConvert image to sepia tone 
ImageSizer::croppingValue($cropping)
string boolGiven an unknown cropping value, return the validated internal representation of it 
ImageSizer::croppingValueStr($cropping)
stringGiven an unknown cropping value, return the string representation of it 
ImageSizer::flipBoth()
boolFlip both vertically and horizontally 
ImageSizer::flipHorizontal()
boolFlip image horizontally 
ImageSizer::flipVertical()
boolFlip image vertically 
ImageSizer::getEngine()
ImageSizerEngine nullGet the current ImageSizerEngine 
ImageSizer::getEngineInfo()
arrayGet array of information for all ImageSizer engines (or optionally a specific ImageSizer engine) 
ImageSizer::getEngines()
arrayGet array of all available ImageSizer engine names in order of priority 
ImageSizer::getExtension()
(nothing) 
ImageSizer::getFailedEngineNames()
(nothing) 
ImageSizer::getFilename()
(nothing) 
ImageSizer::getHeight()
(nothing) 
ImageSizer::getImageInfo()
string arrayImageInformation from Image Inspector in short form or full RawInfoData 
ImageSizer::getImageType()
(nothing) 
ImageSizer::getOptions()
(nothing) 
ImageSizer::getWidth()
(nothing) 
ImageSizer::imageIsAnimatedGif(mixed $image)
bool nullCheck if GIF-image is animated or not ( 
ImageSizer::imageIsRotated(mixed $image)
bool nullCheck orientation ( 
ImageSizer::imageResetIPTC(mixed $image)
null boolPossibility to clean IPTC data, also for original images ( 
ImageSizer::isModified()
(nothing) 
ImageSizer::resize(int $targetWidth)
boolResize the image proportionally to the given width/height
ImageSizer::rotate(int $degrees)
boolRotate image by given degrees 
ImageSizer::setAutoRotation()
(nothing) 
ImageSizer::setCropExtra($value)
(nothing) 
ImageSizer::setCropping()
(nothing) 
ImageSizer::setDefaultGamma()
(nothing) 
ImageSizer::setFilename($filename)
$thisSet the filename 
ImageSizer::setFlip($flip)
(nothing) 
ImageSizer::setForceEngine($engineName)
$thisForce the use of a specific engine 
ImageSizer::setHidpi()
(nothing) 
ImageSizer::setModified($modified)
$thisSet whether a modification was made 
ImageSizer::setOptions(array $options)
$thisSet multiple resize options 
ImageSizer::setQuality($n)
(nothing) 
ImageSizer::setRotate($degrees)
(nothing) 
ImageSizer::setScale($scale)
(nothing) 
ImageSizer::setSharpening($value)
(nothing) 
ImageSizer::setTimeLimit()
(nothing) 
ImageSizer::setUpscaling()
(nothing) 
ImageSizer::setUseUSM()
(nothing) 
ImageSizer::sharpeningValueStr($value)
stringGiven an unknown sharpening value, return the string representation of it 

Additional methods and properties

In addition to the methods and properties above, ImageSizer also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #556
    In the 556th issue of ProcessWire Weekly we're going to share the latest core development news, highlight a new third party module, and more. Read on!
    Weekly.pw / 4 January 2025
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer