Skip to content
themeforge
EN
Start free
Menu
  1. Home
  2. Attribute reference
  3. opt-image
Core Site settings

A logo or picture for the whole site

opt-image="Field name"

An image in the site settings: the logo in the header and footer, a default cover, a payment badge. The client replaces it once, and every page changes.

Where it goes

On the <img> on theme-options.html, which creates the field, and on the same <img> in the header with the same name, which reads it.

The field appears in the admin only if the page has a group name: wp-fields-group on its <body>.

Example: the logo

Markup theme-options.html · index.html
<!-- theme-options.html -->
<img src="images/logo.png" alt="Warm Corner" opt-image="Logo">

<!-- the header of every page -->
<a href="/"><img src="images/logo.png" alt="Warm Corner" opt-image="Logo"></a>
In the admin ThemeForge → Options
Logo logo.png
On the site every page
Warm Corner Home Menu Contacts

What matters

  • alt stays as written in the markup; srcset is removed.
  • PNG, JPG or WebP: SVG does not go into the media library.

Common mistakes

The build log is the “Logs” tab of your project on themeforge.pro; the free markup check shows the same notes.

Not like this
<!-- theme-options.html -->
<img alt="Warm Corner" opt-image="Logo" src="images/logo.png">
<!-- header -->
<img alt="Warm Corner" opt-image="Site logo" src="images/logo.png">

Different names in the settings and in the header: the header reads a field that does not exist and shows no logo. The log is silent.

Like this
<!-- theme-options.html -->
<img alt="Warm Corner" opt-image="Logo" src="images/logo.png">
<!-- header -->
<img alt="Warm Corner" opt-image="Logo" src="images/logo.png">

One name in both places.

Alternative spelling

o_image works the same: the build gives an identical theme.

Used in recipes

Ready when you are

See your site’s WordPress admin before you pay.