Recommended Free Tools
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
ACF supplies the structured content; it does not, by itself, render finished social media artwork. To make visuals from ACF data, retrieve the fields and pass them to an image-rendering step. If you mean the image shown when someone shares a page link, that is a separate job: the page must publish social metadata, including an Open Graph og:image URL.
This guide covers both workflows, with practical paths for a WordPress theme and a headless or external process. It also shows how to expose only the fields a workflow needs, retrieve an ACF image, and check the result for a target network.
First decide what “social media visual” means
There are two related outcomes, and they require different implementation steps:
- A graphic file for direct upload: retrieve ACF values such as a heading, supporting text, and image reference, then use a rendering step to create an image file. The ACF and WordPress documentation explains how to store and retrieve the data; it does not establish that ACF generates finished artwork.
- A link preview image: make the WordPress page emit metadata that social scrapers can read. Open Graph’s
og:imageidentifies the image representing the page. It points to an image URL; it is not a request to render a new image.
You can use the same ACF content in both workflows, but do not confuse generating a downloadable image with assigning a preview image to a page.
Plan the ACF fields and image return format
Create a field group for the relevant post type or content. Depending on the visual, useful fields might include a short title, brief supporting copy, a brand or background image, and an optional per-post image override. Treat these as design choices, not required fields. Keep text concise enough for the intended layout and decide what should happen when optional fields are empty.
For an ACF Image field, select a return format that suits the code consuming it. ACF documents three formats: an image array, an image URL, or an attachment ID. The value your code receives depends on that setting, so inspect the actual field configuration rather than assuming every image field returns a URL. See ACF’s Image field documentation.
- Image array: provides image details in a structured value, which is convenient when the rendering code needs both a URL and other image information.
- Image URL: provides a direct URL when all you need is the file location.
- Image ID: provides a WordPress attachment ID. Theme code can use WordPress image functions, while an external process can look up attachment details through the media REST API.
Read ACF values in a WordPress theme
In server-rendered WordPress code, ACF’s get_field() retrieves a value for use in logic, while the_field() displays a value. ACF’s getting-started guide documents these functions and the broader field workflow: Getting Started with ACF.
For example, retrieve a heading and an image field, then pass them to the template or rendering component that creates your asset. The image-handling branch must match the return format configured in the field group:
Rank #2
- If the image is an array, read its URL from the returned array after checking that the value exists.
- If the image is a URL, use the returned URL as the source.
- If it is an attachment ID, use
wp_get_attachment_image()when rendering HTML. WordPress can generate responsive image markup, includingsrcset, for the attachment.
These functions provide the content and, where relevant, image markup; they do not compose a social graphic. Your image-rendering step still needs to position text, apply brand styling, choose dimensions, and save or deliver the resulting file. Choose that rendering step based on your application and output needs; the cited ACF and WordPress documentation does not prescribe a particular graphics library.
Expose fields for a headless or external workflow
If a separate service or application needs ACF values, use WordPress REST API access rather than scraping rendered theme HTML. ACF REST support for custom fields has been included since ACF 5.11, but field groups are not exposed by default. In the field group settings, enable Show in REST API for the data that should be available. ACF describes the opt-in and response format in its WP REST API Integration guide.
- In WordPress admin, open the ACF field group for the content type.
- Enable Show in REST API in the group settings, then save the group.
- Request the relevant post through the WordPress REST API, for example
/wp-json/wp/v2/posts/POST_IDon your site. - Read the exposed ACF values from the response’s
acfobject. ACF’s basic REST schema represents an Image field as an attachment ID. - If the workflow needs file details or a usable image URL, request the relevant attachment through the WordPress media endpoint, such as
/wp-json/wp/v2/media/ATTACHMENT_ID.
WordPress documents its media resources in the Media REST API reference. To inspect the schema available from a particular endpoint, use an OPTIONS request; the WordPress REST API handbook explains endpoint discovery and reference behavior at REST API Handbook.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesACF also documents acf_format=standard for formatting values through ACF’s global formatter. This may return more information for image values than the default lightweight format. Response shapes can depend on the field and configuration, so inspect the actual response and endpoint schema instead of building against an assumed image object.
Rank #3
Use the retrieved data to create a graphic file
Once the workflow has the content, map each field to a deliberate part of the graphic. For instance, use a short ACF title for the main text, supporting copy for a secondary line, and the image field for a background or product image. Keep a fallback for absent optional values, and validate image references before rendering.
- Separate data from layout: treat the ACF response as content inputs and define typography, positioning, colors, and dimensions in the rendering layer.
- Handle images according to their representation: resolve an attachment ID to media information when necessary; do not pass an ID to code expecting a URL.
- Validate text and assets: account for long titles, missing images, inaccessible media, and characters that may not fit the layout.
- Decide where the output goes: a generated file for manual upload is not automatically attached to a post or selected as that post’s sharing image. Implement those actions separately if required.
There is no universal social image dimension established here. For LinkedIn specifically, its guidance calls for Open Graph compliance and a minimum sharing image dimension of 1200 × 627 pixels. That is LinkedIn guidance, not a rule for every network. Check the current official requirements for each platform you intend to support: Make your website shareable on LinkedIn.
Set the image shown in a shared link preview
For a page preview, the rendered page needs Open Graph metadata with the intended image URL in og:image. The Open Graph protocol also defines image properties for secure URL, MIME type, width, height, and alternative text. When a page specifies og:image, the protocol says it should specify og:image:alt as well. See the Open Graph protocol.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use the ACF image value as the source for the metadata only after resolving it to the actual file URL. If the field returns an attachment ID, retrieve the attachment URL through WordPress or the media endpoint; an ID is not itself a shareable image URL.
Rank #4
Before adding your own tags, inspect the page’s current HTML and the settings of any SEO or social metadata plugin already in use. If a plugin emits Open Graph tags, configure it or integrate with its output rather than adding a second, conflicting og:image. The correct output is the metadata a scraper receives from the page, not merely a value visible in the WordPress editor.
Choose between theme-side retrieval and REST
| Approach | Best fit | What to account for |
|---|---|---|
| ACF functions in a theme | Rendering or metadata generation inside the same WordPress site | Match code to the field’s return format; use WordPress attachment functions when the field is an ID. |
| WordPress REST API | Headless sites, external rendering services, or other decoupled consumers | Enable REST visibility for the group, handle ACF’s response shape, and query media details when needed. |
The choice is about where the consumer runs, not about whether one approach produces better artwork. Either way, ACF is the content source and a separate rendering or metadata step determines the social-facing result.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Protect private content and credentials
ACF states that stored data is not publicly visible by default, except when a field group or individual fields are made available through the REST API. Enabling REST visibility therefore changes what an unauthenticated reader may be able to retrieve. Expose only fields suitable for the intended audience; do not make editorial notes, internal identifiers, or private fields available just because a visual workflow needs a few public values. ACF’s ACF Security Principles explains its approach to data visibility.
Free tools Windows power users keep installed
One-click scans. No signup required.
For writes, ACF’s REST integration uses WordPress core authentication methods. Requests outside a logged-in session need authentication; ACF lists WordPress Application Passwords and a JWT plugin as possible methods. Keep read-only public retrieval distinct from authenticated updates, and never put credentials in browser-visible code or a public page.
Best Value
Troubleshoot common implementation failures
- The REST response has no
acfobject: confirm that Show in REST API is enabled for the relevant field group, that the post type is available through the REST API, and that you are requesting the expected post. - The image value is a number, not a URL: the ACF Image field may be configured to return an attachment ID, as in the basic REST schema. Fetch the media resource or resolve the ID with WordPress rather than treating it as a URL.
- The field value shape differs from your code’s expectation: check the field’s return format and inspect the real API response. If using
acf_format=standard, account for its formatted response rather than assuming the default shape. - The generated artwork has missing text or a blank image area: verify that the expected ACF field is populated, that the image attachment exists and can be fetched, and that the rendering layer handles absent values.
- The page preview shows the wrong image or no image: inspect the page’s emitted Open Graph tags, resolve
og:imageto a publicly reachable image URL, and check for competing tags from a metadata plugin. - A REST write is rejected: confirm that the request is authenticated with a supported WordPress method and that the account has the required permissions. Do not try to solve an authentication failure by exposing a secret in client-side code.
Or skip the browser setup
If the asset or preview workflow needs a clean screenshot of a rendered page, ScreenshotNeo can return a PNG, JPEG, WebP, or PDF from one GET request. Its documented cleanup accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. It also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.
For a screenshot of a rendered page, the cURL call is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. This captures a page; it does not replace retrieving ACF data or generating a custom designed graphic. ScreenshotNeo has 1,000 free screenshots per month without a card, and paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo or sign up free.
Frequently asked questions
Does enabling REST API access expose every ACF field?
REST availability depends on field group or individual field configuration. Review what the group exposes and make only suitable data public.
Can one ACF image field power both a graphic and a page preview?
It can supply an image reference to both workflows, but the graphic still needs a rendering step and the preview still needs page metadata.
Is 1200 × 627 the right size for every social network?
No. The cited dimension is LinkedIn-specific. Verify each intended platform’s current official instructions.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

