Dynamic Tag Image Token
Updated over a week ago

The Dynamic Tag Image Token can be used to select an image dynamically with a Token.

Usage

Write the Token in the code setting of the Dynamic Tag. The Token should expand to either a WordPress Media ID or a URL. We recommend Media IDs as the result will use responsive image sizes.

For example to get the ID of an ACF Image field you can add the `:id` suffix to the token: So [acf:my_image] becomes [acf:my_image:id].

If the image is not a Media Image saved on WordPress but is hosted elsewhere the token can also return an URL. In this case the ACF URL field can be used directly [acf:my_image_url]. Note that by that using this you will not benefit from the responsive image sizes offered by WordPress Media files.

Notes

The Dynamic Tag Image Token obsoletes the Dynamic Tag Token with the "Return as Data" option on, which is now considered deprecated and discouraged. We highly recommend using the Dynamic Tag described in this page as it's more reliable and performant.

Did this answer your question?