{+START,SET,attachment_url}{SCRIPT}?id={ID&}{+START,IF_PASSED,SUP_PARAMS}{SUP_PARAMS}{+END}{+START,IF_NON_PASSED_OR_FALSE,WYSIWYG_SAFE}{$KEEP,0,1}{+START,IF,{$EQ,{$CONFIG_OPTION,anti_leech},1}}&for_session={$SESSION_HASHED}{+END}{+END}{+END}
{$SET,attachment_width,{$?,{$IS_EMPTY,{A_WIDTH}},{$CONFIG_OPTION,thumb_width},{A_WIDTH}}}
{+START,SET,attachment_dimensions}
{+START,IF_NON_EMPTY,{A_WIDTH}} width="{A_WIDTH*}"{+END}
{+START,IF_NON_EMPTY,{A_HEIGHT}} height="{A_HEIGHT*}"{+END}
{+END}
{+START,IF_NON_PASSED_OR_FALSE,WYSIWYG_SAFE}
{+START,SET,attachment_text}
{+START,IF,{$EQ,{A_THUMB},1}} title="" alt="{!IMAGE_ATTACHMENT,{$ATTACHMENT_DOWNLOADS*,{ID},{FORUM_DB_BIN}},{CLEAN_SIZE*}}"{+END}
{+START,IF,{$NEQ,{A_THUMB},1}} title="{A_DESCRIPTION*}" alt="{A_DESCRIPTION*}"{+END}
{+END}
{+START,IF_EMPTY,{$META_DATA,image}}
{$META_DATA,image,{$GET,attachment_url}&no_count=1}
{+END}
{$,IMPORTANT: For live sites you must put these on your own space}
{+START,IF,{$EQ,{A_THUMB},1}}{+END}
{$,Normal display}
{$,Retina display: double DPI}
{$,Fallback}
{+START,IF,{$EQ,{A_THUMB},1}}{+END}
{+END}
{+START,IF_PASSED_AND_TRUE,WYSIWYG_SAFE}
{+START,SET,attachment_text}
{+START,IF,{$EQ,{A_THUMB},1}} title="" alt="{A_DESCRIPTION*}"{+END}
{+START,IF,{$NEQ,{A_THUMB},1}} title="{A_DESCRIPTION*}" alt="{A_DESCRIPTION*}"{+END}
{+END}
{+END}