Unfortunately your question is still unclear after all the explanations, but based on your efforts, I guess you need to pass the image’s URL to a meta field or some sort of array.
So, turning your current code into this will fix the issue:
'img1' => '<img src="'.get_template_directory_uri().'/inc/admin/images/layout.png" alt="Image 1" title="Image 1">'
Related Posts:
- Button inside Custom Meta Box triggering the Update Button
- I need a “Choose from existing content” popin
- WordPress admin area: select box with 12.000+ options
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- ‘Preview Changes’ for custom meta boxes?
- Using TinyMce with textareas in meta boxes on custom post types
- add meta box – custom field : which to choose?
- Add metabox to document tab in gutenberg
- How can I avoid re-inventing the Custom Fields wheel in my Plugin’s Metabox?
- How to prevent custom fields from being cleared during a bulk edit?
- Add custom option to Standard Page Attributes Meta Box
- Only show metabox when date-value in other metabox is over?
- Populating meta box with select-list of existing posts, and assigning it to custom post types
- Create meta boxes that don’t show in custom fields
- How To Create a Metabox of HTML Content with Instructions For Editors When Editing a Post or Page?
- wp_editor in add_meta_boxes does not show gallery
- How do I assign this filter to a variable? (Appending php & markup to the_content)
- Problem with adding exta field in metabox in custom post type
- Adding a custom field or metabox to the post-thumbnail widget?
- How do I add custom_meta_box_id’s value?
- Metabox image upload and custom field
- My metabox class
- How to construct multiple meta boxes
- Loading scripts to the Post Edit page only
- Force hide custom field metaboxes
- Woocommerce with metabox plugin
- How to Display Custom Meta Box only on Specific Page IDs
- Add More Fields to Users Pages (Admin Panel)
- Metabox will not save
- How to check for specific meta box value on front end and output accordingly
- How Meta Data is different from Custom Fields of POST/PAGE in WordPress
- custom field not saved
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- How make a custom search on backend in WordPress without plugin?
- Create Multiple File Upload Metabox in WordPress
- Users Select inside custom metabox
- Custom Metabox Not Saving
- Better Method for Multiple Meta Boxes
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?
- Unsaved changes in metabox inputs not detected in the block editor
- Custom Fields box in the post editor: Replace textareas with input elements
- Client PDF Upload (Catalogue) – Automatically update link to PDF
- Get updated meta value after post update or published (custom post type) using hook
- Why is my Custom Meta Box Field Inputs NOT saving?
- custom-meta-box checkboxes from loop won’t save
- Outputing a metabox textarea and avoid line breaks inside li tags
- How can you include custom post meta in search without calling each key?
- shortcode in a custom metabox
- Specific coditional usage [closed]
- Set checkbox as checked by default in a metabox
- Singleton Custom Field (Meta Box)
- Problem with saving large amount of data in postmeta/usermeta
- Move Title and the Content WYSIWYG editor position
- How can I hide custom field from users used for caching response from external api?
- Displaying Meta-Box Data Properly
- WordPress colorpicker save both hex and RGB
- How add multiple wp_editor_box to new post
- If metabox has content display content
- Custom meta boxes not saving
- HM CMB: Role Select
- Get meta field value of all catgories
- Jquery on custom-field backend
- Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?
- How to store meta field values
- How to Convert Custom Fields from Text to Array?
- WP E-Commerce Custom Meta > Serialized array
- Make separate text boxes for separate WordPress Custom Fields
- show a specific metabox dependent on the page template
- Making custom meta box required (with error message if not filled in) on Gutenberg
- HTML for adding a meta box (basic text field) to page editor?
- Set class if a meta value is set within post archive
- Adding text box with add_meta_box
- Using Customizer API vs Custom Meta Box for custom content
- How can I ‘check’ the “custom fields” box from the Screen Options?
- Allow HTML in Custom Metabox area
- Metabox/Custom fields are not saving input data
- Custom field metabox not showing in back-end
- How to display selected option from dropdown list in a metabox
- Save, update, get and sanitize post meta as HTML not plain
- Link fields in User Admin list
- Update custom table on metabox POST
- Metabox value for post loop?
- how to modify a field’s size in a metabox : ROWS height, and scroll control?
- Save custom post data outside of default post form
- Append custom field items to content from plugin
- When post is updated, custom metadata in text area field is overwritten
- Call the latest posts from a custom field group to be displayed on front-page
- Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page
- Can i categorise my meta box?
- Decouple page name from page title
- Custom Metaboxes, multiple post selection
- added a meta box to post however when saving menu while debug on throws a warning
- When editing a post with a custom meta box the values aren’t displaying correctly
- Use Metabox to enter Post Title
- Include custom fields into the content of a regular page
- How to get the value of particular get $meta value in wordpress
- Display custom field value into content with hyperlink
- How to add new Metadata options (Date, Author, etc.) for Posts?
- Saving multiple custom meta box fields