I have the following code which works fine, however the image loads at its original width at 540px.
I would like to change the width of the image. I've tried adding style to <td>
but it doesn't seem to work. What can I add to the following html code to set max-width of 270px?
AMPSCRIPT
SET @ImageId = "28034"
SET @FeatureImage1 = ContentImagebyID(@ImageId)
]%%
I've tried using the following HTML which results in no changes to the width of the image:
<td align="center" class="fluid" style="width: 100%; max-width: 270px; height: auto; padding: 0px; text-align: center;" width="270">
<a alias="" conversion="false" data-linkto="http://" href="http://" target="_blank" title="">%%=v(@FeatureImage1)=%%</a></td>
If I don't use the ContentImagebyID
, it works fine with the following code, however I need a solution as I am wanting to dynamically populate an area in the table.
<td align="center" class="fluid">
<a alias="" conversion="false" data-linkto="http://" href="http://" target="_blank" title=""><img alt="Alt-Text" data-assetid="19943" src="http://image.companya.com/lib/fe4115707564067d701674/m/1/80e426bc-1964-41a2-a48c-34298e8fbbd8.jpg" style="width: 100%; max-width: 270px; height: auto; padding: 0px; text-align: center;" width="270"></a></td>