solved Mobile vs Desktop Image Code

SoftDesigns
SoftDesigns
@softdesigns
6 years ago
242 posts
Hi - Hoping to find the Smarty Template Code to resize an image differently for Mobile or Desktop.
It seems before, I did see some Smarty Code to achieve this, but cannot remember which template.
--
Need Smarty Code Logic similar to this:
{if mobile}
image.size = x
{else if desktop}
image.size = y
{endif}
--
Please Advise...
updated by @softdesigns: 12/25/18 10:45:08PM
michael
@michael
6 years ago
7,746 posts
{if jrCore_is_mobile_device() || jrCore_is_tablet_device()}
// do stuff
{/if}

Tags