Update an image in email using the API while leaving width/height empty?

lukea
Level 3

Update an image in email using the API while leaving width/height empty?

Hi Marketo Nation,

 

I am using the following endpoint to update an image within the email content: https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Emails/update...

 

POST /rest/asset/v1/email/1234/content/header_image.json
with

type=Image&externalUrl=https%3A%2F%2Fsub.example.com%2Frs%2Ffoobar%2Fimages%2Fbanner_1200x400px.jpg&altText=%7B%7Bmy.alt%7D%7D&style=width%3A%20100%25%3Bdisplay%3Ablock

 

Issue:

I have not found a way to leave width and/or height for the image empty. This would meet the spec in the email template, where the image placeholder is set with `width` being "600", and `height` is not provided/fixed. For now, the image always appears distorted. (Note that upon manual image upload/specification from within the email builder it works as expected.)

 

Question:

How do I need to alter the POST request to get an empty `height` attribute for the image? I have fiddled around with "null", but to no avail.

 

Thank you!

Tags (4)