WebP Express + ACF
-
Hi rosell.dk,
We’ve started using your plugin recently and now have a question.
Is there a way to use functions from your plugin files to get WebP images for custom fields created by Advanced Custom Fields plugin.
Let assume we have the following situation.
We have custom fields created by ACF for a particular page template.
In PHP file of this page template we get image URL (or array with all image attributes) via get_field() function
$image = get_field('banner_image');
Then we output this image
printf("<img src='%s' alt='%s' />", $image['url'], $image['alt'])
What actions do we have to do to get
<picture> <source> <img>
instead of plain image tag?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘WebP Express + ACF’ is closed to new replies.