---
id: post/yzhums-com/61543
type: post
title: "Dynamics 365 Business Central: How to get HTML Image src attribute via AL (The Image Embed element)"
summary: The post explains how to extract HTML Image src attributes from images stored in Business Central items using the standard Image Helpers codeunit and GetHTMLImgSrc method. This technique allows developers to retrieve and display image data in HTML format within AL code.
tier: community
language: en
tags:
  - image handling
  - html integration
  - al development
  - tenant media
  - web display
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:42:23.084Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 9499e52bd9c2a281a448bb61f7c8e3c52f8c9f886c7e6703b2e0433e23131d0a
evidence:
  - kind: blog
    url: https://yzhums.com/61543/
    title: "Dynamics 365 Business Central: How to get HTML Image src attribute via AL (The Image Embed element)"
    date: "2025-09-01"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/61543/
    title: "Dynamics 365 Business Central: How to get HTML Image src attribute via AL (The Image Embed element)"
    date: "2025-09-01"
    commit: null
    t: null
    quote: The HTML Image src attribute of the image can be inserted after src to display it directly.
  - kind: blog
    url: https://yzhums.com/61543/
    title: "Dynamics 365 Business Central: How to get HTML Image src attribute via AL (The Image Embed element)"
    date: "2025-09-01"
    commit: null
    t: null
    quote: There is a standard method for obtaining HTML Image src attribute directly in BC.
links:
  learn: []
  objects:
    - object/codeunit/4112
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "61543"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/61543/
published_at: "2025-09-01T00:52:44.000Z"
author: Yun Zhu
full_text: false
words: 239
quotes:
  - text: The HTML Image src attribute of the image can be inserted after src to display it directly.
    why_it_matters: Explains the fundamental purpose of the src attribute in HTML image tags for direct display
  - text: There is a standard method for obtaining HTML Image src attribute directly in BC.
    why_it_matters: Highlights that developers don't need custom solutions as Business Central provides built-in functionality
code_objects_mentioned:
  - codeunit Image Helpers
  - table Tenant Media
systems:
  - development
  - platform
versions_mentioned: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2025/09/Snipaste_2025-09-01_09-07-33.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:16:02.711Z"
---

# Dynamics 365 Business Central: How to get HTML Image src attribute via AL (The Image Embed element)

[Read the post](https://yzhums.com/61543/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2025-09-01 · 239 words · tier community · reviewed (checked by Opus)

> The post explains how to extract HTML Image src attributes from images stored in Business Central items using the standard Image Helpers codeunit and GetHTMLImgSrc method. This technique allows developers to retrieve and display image data in HTML format within AL code.

## Key points

- Business Central provides a standard Image Helpers codeunit (4112) with a GetHTMLImgSrc procedure for obtaining HTML image src attributes
- Images stored as Tenant Media records can be retrieved and converted to HTML-compatible src attributes via AL code
- The WebPageViewer add-in can display images using HTML img tags with embedded src attributes
- Example code demonstrates extending the Item Card page to retrieve and display the HTML src attribute of item pictures

## Quotes

- "The HTML Image src attribute of the image can be inserted after src to display it directly." (Explains the fundamental purpose of the src attribute in HTML image tags for direct display)
- "There is a standard method for obtaining HTML Image src attribute directly in BC." (Highlights that developers don't need custom solutions as Business Central provides built-in functionality)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [codeunit 4112 "Image Helpers"](../../objects/codeunit/4112.md)
- table "Tenant Media"

Not found in BC28-30: table "Tenant Media".

## Context

- Features: HTML image src attribute retrieval, base64 image display, image embedding in web pages, WebPageViewer add-in

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
