# Use datatable content as code

**URL:** <https://community.plotly.com/t/use-datatable-content-as-code/76604>\
**Category:** Dash Python\
**Created:** [July 4, 2023, 6:25am UTC](https://community.plotly.com/t/use-datatable-content-as-code/76604 "2023-07-04T06:25:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![subodhpokhrel7](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@subodhpokhrel7](https://community.plotly.com/u/subodhpokhrel7)\
**Post date:** [July 4, 2023, 6:25am UTC](https://community.plotly.com/t/use-datatable-content-as-code/76604/1 "2023-07-04T06:25:26Z")

</div>

Hi,

I have a datatable with a column whose content is something like this:

html.Img(src=“…”)

How do I tweak my code in a way that I get an image in the datatable instead of a string as the one above?

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [July 4, 2023, 9:22am UTC](https://community.plotly.com/t/use-datatable-content-as-code/76604/2 "2023-07-04T09:22:01Z")

</div>

HI @subodhpokhrel7 welcome to the forums.

Maybe related?

> [@Dash data frame with html.Img or loading an image from local directory](https://community.plotly.com/t/dash-data-frame-with-html-img-or-loading-an-image-from-local-directory/76209):
>
> have been attempting to load an image, or better yet, a thumbnail, using html.Img() but without success. Displaying the standalone image works perfectly fine. I used this path because I couldn’t load an image from a local directory, unlike all the provided examples where the image is sourced from the web(http://). I would greatly appreciate an example for any of the aforementioned scenarios.

---

<div class="post-metadata">

**Author:** ![subodhpokhrel7](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@subodhpokhrel7](https://community.plotly.com/u/subodhpokhrel7)\
**Post date:** [July 4, 2023, 6:19pm UTC](https://community.plotly.com/t/use-datatable-content-as-code/76604/3 "2023-07-04T18:19:21Z")

</div>

AG Grid solves my problem. Thank you
