Just a mechanics question. After you drop an image into the design, you select its placeholder. Do you mean select the image, turn into a placeholder and add code.
In the placeholder the code you mention would go into the body of the placeholder?

W