imgattr 2.1.0-pl1

imgattr 2.1.0-pl1

Released Jan 08, 2015 by sepiariver

imgattr is a MODX Revolution output filter that grabs attributes from an image file using php getimagesize()

Download 27kb (1066 downloads)
Downloads: 2,017
License: GPLv2
Requires Revolution 2.0.x or greater
Supports mysql
An output filter that returns attributes from an image file, using PHP getimagesize(). Github: 

Installation Instructions

Install via Package Management.




Where the value of [[*image_tv]] is "assets/images/photo.jpg" with dimensions 100px x 50px.

[[*image_tv:imgattr=`filename`]] // 'photo.jpg' 

[[*image_tv:imgattr=`filenameNoExt`]] // 'photo' 

[[*image_tv:imgattr=`width`]] // '100' 

[[*image_tv:imgattr=`height`]] // '50' 

[[*image_tv:imgattr=`dimensions`]] // 'width="100" height="50"' 

[[*image_tv:imgattr=`mime`]] // 'image/jpeg'




* tracked in github:

* added system setting to enable using path only (strip hostname from image URLs before processing)


 * Normalize for base_url (thanks Mike!) 

* Prepend base_path 

 * Add toPlaceholder support 

* General code improvements 

 1.0.0-pl1 Initial public release. 

* Added 'filenameNoExt' option. 

* Added comments and corrections. 


Initial beta release.

Version Released Author Downloads
4 Versions 1 Contributors 2,020 Downloads
2.0.0-pl1 Dec, 09 2014 sepiariver 184
1.0.0-pl1 Jul, 28 2013 sepiariver 448
1.0.0-beta1 Apr, 11 2013 sepiariver 322