Skip to content

Instantly share code, notes, and snippets.

@tessguefen
Last active August 29, 2015 14:17
Show Gist options
  • Save tessguefen/6041333089dbda287d9c to your computer and use it in GitHub Desktop.
Save tessguefen/6041333089dbda287d9c to your computer and use it in GitHub Desktop.
Generate Images with Custom Width/ Height using mvdo (Thank you Ryan!!)
<mvt:item name="toolkit" param="customimagec|main|l.all_settings:product:code|main|||1" />
<mvt:assign name="l.height" value="178" />
<mvt:assign name="l.width" value="178" />
<mvt:do file="g.Module_Library_DB" name="l.image_loaded" value="Image_Load_File( g.main, l.image )" />
<mvt:if expr="l.image_loaded">
<mvt:do file="g.Module_Library_DB" name="l.generated_image_loaded" value="GeneratedImage_FindOrInsert_Image_Dimensions( l.image, l.width, l.height, l.settings:generated_image )" />
</mvt:if>
<!-- Checking -->
&mvt:generated_image;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment