InputfieldImage class

One or more image uploads (sortable)

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

Show class?             Show args?        

Common

NameReturnSummary 
InputfieldImage::adminThumbScale int for backwards compatibility only 
InputfieldImage::clientQuality int Quality setting to use for client-side resize. 60=60%, 90=90%, etc. (default=90).  
InputfieldImage::dimensionsByAspectRatio bool int Switch min-/maxWidth and min-/maxHeight restriction for portrait images 
InputfieldImage::extensions string Space separated list of allowed image extensions (default="JPG JPEG GIF PNG") 
InputfieldImage::focusMode string May be 'on', 'off', or 'zoom' 
InputfieldImage::get($key)
mixed nullGet a property or attribute from the Inputfield 
InputfieldImage::getAdminThumb(Pageimage $img)
arrayGet thumbnail image info 
InputfieldImage::getConfigInputfields()
InputfieldWrapperConfigure field
InputfieldImage::getFileActions($pagefile)
arrayGet array of actions available for given Pagefile
InputfieldImage::gridMode string Default grid mode in admin, one of "grid", "left" or "list" (default="grid") 
InputfieldImage::gridSize int squared size of the admin thumbnails (default=130) 
InputfieldImage::imageSizerOptions array Options to pass along to the ImageSizer class. See /wire/config.php $imageSizerOptions for details. 
InputfieldImage::itemClass string Space separated CSS classes for items rendered by this Inputfield. Generally you should append rather than replace. 
InputfieldImage::maxHeight int string Max height for uploaded images, larger will be sized down (default='') 
InputfieldImage::maxReject bool int Reject images that exceed max allowed size? (default=false) 
InputfieldImage::maxSize float Maximum number of megapixels for client-side resize, i.e. 1.7 is ~1600x1000, alt. to maxWidth/maxHeight (default=0). 
InputfieldImage::maxWidth int string Max width for uploaded images, larger will be sized down (default='') 
InputfieldImage::minHeight int string Min height for uploaded images, smaller will be refused (default='') 
InputfieldImage::minWidth int string Min width for uploaded images, smaller will be refused (default='') 
InputfieldImage::okExtensions array Array of manually whitelisted extensions, for instance [ 'SVG' ] must be manually whitelisted if allowed. (default=[]) 
InputfieldImage::processInput(WireInputData $input)
$thisProcess input
InputfieldImage::processUnknownFileAction(Pageimage $pagefile, $action, $label)
bool null
InputfieldImage::render()
stringRender Inputfield
InputfieldImage::renderItem(Pageimage $pagefile, $id, $n)
string
InputfieldImage::renderList(Pageimages $value)
string
InputfieldImage::renderReady()
boolCalled right before Inputfield render 
InputfieldImage::renderSingleItem(Pageimage $pagefile, $id, $n)
string
InputfieldImage::renderUpload(Pageimages $value)
string
InputfieldImage::resizeServer int bool Resize to max width/height at server? 1=Server-only, 0=Use client-side resize when possible (default=0).  
InputfieldImage::useImageEditor int bool Whether or not the modal image editor is allowed for this field (default=true) 

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.184

Twitter updates

  • ProcessWire 3.0.185 (dev) core updates, plus new Session Allow module— More
    17 September 2021
  • Three new ProcessWire Textformatter modules: Find/Replace, Markdown in Markup, and Emoji— More
    3 September 2021
  • This week we have a new master version released after a year in the making. With nearly 40 pull requests, hundreds of new additions and more than 100 issue reports resolved, this new version has a ton of great new stuff— More
    27 August 2021

Latest news

  • ProcessWire Weekly #384
    In the 384th issue of ProcessWire Weekly we'll cover the latest core updates, introduce a new module called Session Allow, and highlight a new site of the week. Read on!
    Weekly.pw / 18 September 2021
  • ProcessWire 3.0.184 new master/main version
    This week we have a new master/main version released after a full year in the making. As you might imagine, this new version has a ton of great new stuff and we’ll try to cover much of it here.
    Blog / 27 August 2021
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani