ACF Image Field – Twig
1. Return Value: Array
If you set the return value of the ACF image field to Array, the field will return an array containing the image data (URL, title, alt text, etc.).
2. Return Value: URL
If the return value is set to URL, ACF will return only the image URL.
3. Return Value: ID
If the return value is set to ID, ACF will return the image ID, and you can use WordPress’s built-in functions to retrieve the image details from the ID.
/////////////////////return Value: Array
{% set screenshot = post.meta('screenshot') %}
{% if screenshot %}
<img src="{{ screenshot.url }}" alt="{{ screenshot.alt }}">
{% endif %}
//////////////////////Return Value: URL
{% set screenshot_url = post.meta('screenshot') %}
{% if screenshot_url %}
<img src="{{ screenshot_url }}" alt="Screenshot">
{% endif %}
/////////////////////Return Value: ID
{% set screenshot_id = post.meta('screenshot') %}
{% if screenshot_id %}
{% set image = TimberImage(screenshot_id) %}
<img src="{{ image.src }}" alt="{{ image.alt }}">
{% endif %}