Search code examples
amp-html

amp-img variable substitution data-amp-addparams


I would like to do the following:

<amp-img width="50px" height="50px" src="localhost:8080/files/id=QUERY_PARAM(id) data-amp-addparams="&type=property></amp-img>

Basically, I need to access this url:

"localhost:8080/files/{id}&type=property".But it does not seem to work.

It works fine with amp-list when the id is at the very end and I don't need data-amp-addparams.

Any suggestions?


Solution

  • Variable substitution is currently not supported by amp-img. I'd recommend creating a feature request for the AMP runtime here.