"image extension" Snippets


Basket #18886

Grab the 3 letter extension off of an image file. Could be improved to look for last ',' and grab all after in case of variations like '.jpeg'.
Created: 1473454796
View "Basket #18886"
<mvt:assign name="g.url" value="'http://dev.mcrmedical.com/mm5/graphics/00000001/fak28-MCR-first-aid-kit-front.jpeg'" /> <mvt:assign name="g.extension" value="substring(g.url,(len(g.url)-3),4)" /> &mvt:global:extension;
 

image extension

Grab the 3 letter extension off of an image file. Could be improved to look for last ',' and grab all after in case of variations like '.jpeg'.
Created: 1459875237
View "image extension"
<mvt:assign name="g.url" value="'http://dev.mcrmedical.com/mm5/graphics/00000001/fak28-MCR-first-aid-kit-front.jpg'" /> <mvt:assign name="g.extension" value="substring(g.url,(len(g.url)-3),4)" /> &mvt:global:extension;
 

image extension

Grab the 3 letter extension off of an image file. Could be improved to look for last ',' and grab all after in case of variations like '.jpeg'.
Created: 1459875200
View "image extension"
<mvt:assign name="g.url" value="'http://dev.mcrmedical.com/mm5/graphics/00000001/fak28-MCR-first-aid-kit-front.jpg'" /> <mvt:assign name="g.extension" value="substring(g.url,(len(g.url)-3),4)" /> &mvt:global:extension;