You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "SukiSeven (via GitHub)" <gi...@apache.org> on 2025/09/03 08:35:14 UTC
[D] Display image thumbnails from URL fields in Table chart [superset]
GitHub user SukiSeven created a discussion: Display image thumbnails from URL fields in Table chart
Problem
I have a MySQL table called message_files.
One of the columns is url (type TEXT), which stores direct image links.
In Superset, when I explore this table with a Table chart, the url field is displayed as plain text.
I would like to:
1、Render this url field as a small thumbnail image inside the table cell.
2、When clicking the thumbnail, open the full image (either in a new tab or with a preview/lightbox).
<img width="1148" height="412" alt="image" src="https://github.com/user-attachments/assets/aed9b900-fd04-42c2-8a69-04c43c738e04" />
GitHub link: https://github.com/apache/superset/discussions/35000
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven added a comment to the discussion: Display image thumbnails from URL fields in Table chart
<img width="1936" height="194" alt="image" src="https://github.com/user-attachments/assets/0f1d1b9e-f02d-4571-8c4a-158fba60991a" />
### Description
I have a MySQL table where a column contains multiple URLs separated by line breaks. For example:
132.com/upload_files/.../file1.png
132.com/upload_files/.../file2.png
132.com/upload_files/.../file3.png
When I use Superset Table chart to display this column, all line breaks are removed and the URLs appear in a single line, separated by spaces:
132.com/upload_files/.../file1.png dify-external.oss-cn-hongkong.aliyuncs.com/upload_files/.../file2.png 132.com/upload_files/.../file3.png
### Expected Behavior
I expect the table to preserve line breaks so that each URL appears on a separate line, like in MySQL.
### Environment
- Superset version: (4.0.1)
- Database: MySQL
- Chart type: Table
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325238
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven edited a comment on the discussion: Display image thumbnails from URL fields in Table chart
<img width="1936" height="194" alt="image" src="https://github.com/user-attachments/assets/0f1d1b9e-f02d-4571-8c4a-158fba60991a" />
### Description
I have a MySQL table where a column contains multiple URLs separated by line breaks. For example:
132.com/upload_files/.../file1.png
132.com/upload_files/.../file2.png
132.com/upload_files/.../file3.png
When I use Superset Table chart to display this column, all line breaks are removed and the URLs appear in a single line, separated by spaces:
132.com/upload_files/.../file1.png dify-external.oss-cn-hongkong.aliyuncs.com/upload_files/.../file2.png 132.com/upload_files/.../file3.png
### Expected Behavior
I expect the table to preserve line breaks so that each URL appears on a separate line, like in MySQL.
### Environment
- Superset version: (4.0.1)
- Database: MySQL
- Chart type: Table
@dosu
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325238
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Display image thumbnails from URL fields in Table chart
<!-- Answer -->
Superset Table charts do not preserve line breaks in plain text fields because browsers collapse whitespace and newlines unless the content is rendered as HTML with `<br>` tags. Superset does not automatically convert `\n` to `<br>`, and there is no built-in option or CSS setting to preserve line breaks in plain text cells.
To display each URL on a separate line, update your SQL query to replace line breaks with `<br>`, for example:
`REPLACE(REPLACE(url_column, '\r\n', '<br>'), '\n', '<br>')`
Then, enable the "Render columns in HTML format" option in your Table chart settings. This will render the `<br>` tags as line breaks in the table cell. Plain `\n` will not be shown as new lines unless you do this.
There is no other workaround or configuration in Superset 4.0.1 to preserve line breaks in Table chart cells without converting them to HTML [`source`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=eb37fcdb-cdc7-40f8-9a5f-fd8a97546624) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325242
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven edited a comment on the discussion: Display image thumbnails from URL fields in Table chart
> 在 Superset 4.0.1 的 Table 图表中,开启“Render columns in HTML format”方法如下:
>
> 1. 打开你的 Table 图表,进入 Explore(探索)模式。
> 2. 在右侧的图表设置(控制面板)中,找到 “Time Series Table Options” 部分。
> 3. 勾选 “Render columns in HTML format (dangerous)” 选项。
>
> 开启后,表格单元格里的 HTML(比如 `<br>` 或 `<img>` 标签)会被直接渲染。如果你想让多行内容换行,记得先在 SQL 里把 `\n` 替换成 `<br>`,比如:`REPLACE(REPLACE(url_column, '\r\n', '<br>'), '\n', '<br>')`。
>
> 注意:开启此功能会让表格渲染原始 HTML,存在一定安全风险,请确保数据来源可信。[参考](https://github.com/apache/superset/issues/34082)
>
> _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._
>
> How did I do? [Good](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=other) [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35000)
How to open Explore
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325730
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven added a comment to the discussion: Display image thumbnails from URL fields in Table chart
如何启动Render columns in HTML forma
@dosu
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325253
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven added a comment to the discussion: Display image thumbnails from URL fields in Table chart
> 在 Superset 4.0.1 的 Table 图表中,开启“Render columns in HTML format”方法如下:
>
> 1. 打开你的 Table 图表,进入 Explore(探索)模式。
> 2. 在右侧的图表设置(控制面板)中,找到 “Time Series Table Options” 部分。
> 3. 勾选 “Render columns in HTML format (dangerous)” 选项。
>
> 开启后,表格单元格里的 HTML(比如 `<br>` 或 `<img>` 标签)会被直接渲染。如果你想让多行内容换行,记得先在 SQL 里把 `\n` 替换成 `<br>`,比如:`REPLACE(REPLACE(url_column, '\r\n', '<br>'), '\n', '<br>')`。
>
> 注意:开启此功能会让表格渲染原始 HTML,存在一定安全风险,请确保数据来源可信。[参考](https://github.com/apache/superset/issues/34082)
>
> _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._
>
> How did I do? [Good](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=other) [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35000)
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325730
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven deleted a comment on the discussion: Display image thumbnails from URL fields in Table chart
哪里可以打开explore,有图吗@dosu
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325260
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Display image thumbnails from URL fields in Table chart
<!-- Answer -->
Superset Table charts do not preserve line breaks in plain text fields because browsers collapse whitespace and newlines unless the content is rendered as HTML with `<br>` tags. Superset does not automatically convert `\n` to `<br>`, and there is no built-in option or CSS setting to preserve line breaks in plain text cells.
To display each URL on a separate line, update your SQL query to replace line breaks with `<br>`, for example:
`REPLACE(REPLACE(url_column, '\r\n', '<br>'), '\n', '<br>')`
Then, enable the "Render columns in HTML format" option in your Table chart settings. This will render the `<br>` tags as line breaks in the table cell. Plain `\n` will not be shown as new lines unless you do this.
There is no other workaround or configuration in Superset 4.0.1 to preserve line breaks in Table chart cells without converting them to HTML [`source`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/eb37fcdb-cdc7-40f8-9a5f-fd8a97546624?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/eb37fcdb-cdc7-40f8-9a5f-fd8a97546624?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/eb37fcdb-cdc7-40f8-9a5f-fd8a97546624?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/eb37fcdb-cdc7-40f8-9a5f-fd8a97546624?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/eb37fcdb-cdc7-40f8-9a5f-fd8a97546624?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/eb37fcdb-cdc7-40f8-9a5f-fd8a97546624?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/eb37fcdb-cdc7-40f8-9a5f-fd8a97546624?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35000)
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325242
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven closed a discussion: Display image thumbnails from URL fields in Table chart
Problem
I have a MySQL table called message_files.
One of the columns is url (type TEXT), which stores direct image links.
In Superset, when I explore this table with a Table chart, the url field is displayed as plain text.
I would like to:
1、Render this url field as a small thumbnail image inside the table cell.
2、When clicking the thumbnail, open the full image (either in a new tab or with a preview/lightbox).
<img width="1148" height="412" alt="image" src="https://github.com/user-attachments/assets/aed9b900-fd04-42c2-8a69-04c43c738e04" />
GitHub link: https://github.com/apache/superset/discussions/35000
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "firewall413 (via GitHub)" <gi...@apache.org>.
GitHub user firewall413 closed the discussion with a comment: Display image thumbnails from URL fields in Table chart
I feel this is not possible anymore in superset 6.0.0. All img tags get sanitized even with sanitization false. Am I correct?
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-16306482
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven edited a comment on the discussion: Display image thumbnails from URL fields in Table chart
哪里可以打开explore,有图吗@dosu
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325260
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven added a comment to the discussion: Display image thumbnails from URL fields in Table chart
哪里可以打开explore,有图吗
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325260
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Display image thumbnails from URL fields in Table chart
<!-- Answer -->
You can display image thumbnails from URL fields in Superset Table charts by enabling the "Render Columns in HTML Format" option. Format your URL field as an HTML `<img>` tag (for example, using a SQL expression like `CONCAT('<img src=\"', url, '\" width=\"40\"/>')`). Superset's sanitizer allows `<img>` tags and their `src` attributes, so thumbnails will render in table cells if the HTML is correct and the option is enabled [[source]](https://github.com/apache/superset/issues/34082#issuecomment-3062724713) [[source]](https://github.com/apache/superset/discussions/33220).
For click-to-preview, you can wrap the `<img>` tag in an `<a>` tag with `target="_blank"` to open the full image in a new tab, like:
`CONCAT('<a href=\"', url, '\" target=\"_blank\"><img src=\"', url, '\" width=\"40\"/></a>')`
Lightbox-style previews are not supported out of the box, since custom JavaScript is not allowed in table cells [[source]](https://github.com/apache/superset/discussions/35000).
If images do not render, double-check that the "Render Columns in HTML Format" option is enabled and your HTML is valid. Some users have reported version-specific issues, so results may vary depending on your Superset version [[source]](https://github.com/apache/superset/discussions/33220).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5558803c-9573-4146-8cee-e26acb9e61d6?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5558803c-9573-4146-8cee-e26acb9e61d6?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5558803c-9573-4146-8cee-e26acb9e61d6?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5558803c-9573-4146-8cee-e26acb9e61d6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5558803c-9573-4146-8cee-e26acb9e61d6?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5558803c-9573-4146-8cee-e26acb9e61d6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5558803c-9573-4146-8cee-e26acb9e61d6?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35000)
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14293844
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "SukiSeven (via GitHub)" <gi...@apache.org>.
GitHub user SukiSeven deleted a comment on the discussion: Display image thumbnails from URL fields in Table chart
> 在 Superset 4.0.1 的 Table 图表中,开启“Render columns in HTML format”方法如下:
>
> 1. 打开你的 Table 图表,进入 Explore(探索)模式。
> 2. 在右侧的图表设置(控制面板)中,找到 “Time Series Table Options” 部分。
> 3. 勾选 “Render columns in HTML format (dangerous)” 选项。
>
> 开启后,表格单元格里的 HTML(比如 `<br>` 或 `<img>` 标签)会被直接渲染。如果你想让多行内容换行,记得先在 SQL 里把 `\n` 替换成 `<br>`,比如:`REPLACE(REPLACE(url_column, '\r\n', '<br>'), '\n', '<br>')`。
>
> 注意:开启此功能会让表格渲染原始 HTML,存在一定安全风险,请确保数据来源可信。[参考](https://github.com/apache/superset/issues/34082)
>
> _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._
>
> How did I do? [Good](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=other) [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35000)
How to open Explore
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325730
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Display image thumbnails from URL fields in Table chart
<!-- Answer -->
在 Superset 4.0.1 的 Table 图表中,开启“Render columns in HTML format”方法如下:
1. 打开你的 Table 图表,进入 Explore(探索)模式。
2. 在右侧的图表设置(控制面板)中,找到 “Time Series Table Options” 部分。
3. 勾选 “Render columns in HTML format (dangerous)” 选项。
开启后,表格单元格里的 HTML(比如 `<br>` 或 `<img>` 标签)会被直接渲染。如果你想让多行内容换行,记得先在 SQL 里把 `\n` 替换成 `<br>`,比如:`REPLACE(REPLACE(url_column, '\r\n', '<br>'), '\n', '<br>')`。
注意:开启此功能会让表格渲染原始 HTML,存在一定安全风险,请确保数据来源可信。[参考](https://github.com/apache/superset/issues/34082)
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35000)
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325257
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Display image thumbnails from URL fields in Table chart
<!-- Answer -->
You can display image thumbnails from URL fields in Superset Table charts by enabling the "Render Columns in HTML Format" option. Format your URL field as an HTML `<img>` tag (for example, using a SQL expression like `CONCAT('<img src=\"', url, '\" width=\"40\"/>')`). Superset's sanitizer allows `<img>` tags and their `src` attributes, so thumbnails will render in table cells if the HTML is correct and the option is enabled [[source]](https://github.com/apache/superset/issues/34082#issuecomment-3062724713) [[source]](https://github.com/apache/superset/discussions/33220).
For click-to-preview, you can wrap the `<img>` tag in an `<a>` tag with `target="_blank"` to open the full image in a new tab, like:
`CONCAT('<a href=\"', url, '\" target=\"_blank\"><img src=\"', url, '\" width=\"40\"/></a>')`
Lightbox-style previews are not supported out of the box, since custom JavaScript is not allowed in table cells [[source]](https://github.com/apache/superset/discussions/35000).
If images do not render, double-check that the "Render Columns in HTML Format" option is enabled and your HTML is valid. Some users have reported version-specific issues, so results may vary depending on your Superset version [[source]](https://github.com/apache/superset/discussions/33220).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=5558803c-9573-4146-8cee-e26acb9e61d6) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14293844
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Display image thumbnails from URL fields in Table chart [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Display image thumbnails from URL fields in Table chart
<!-- Answer -->
在 Superset 4.0.1 的 Table 图表中,开启“Render columns in HTML format”方法如下:
1. 打开你的 Table 图表,进入 Explore(探索)模式。
2. 在右侧的图表设置(控制面板)中,找到 “Time Series Table Options” 部分。
3. 勾选 “Render columns in HTML format (dangerous)” 选项。
开启后,表格单元格里的 HTML(比如 `<br>` 或 `<img>` 标签)会被直接渲染。如果你想让多行内容换行,记得先在 SQL 里把 `\n` 替换成 `<br>`,比如:`REPLACE(REPLACE(url_column, '\r\n', '<br>'), '\n', '<br>')`。
注意:开启此功能会让表格渲染原始 HTML,存在一定安全风险,请确保数据来源可信。[参考](https://github.com/apache/superset/issues/34082)
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=5f32a9b8-ad8a-477b-a5e9-fea8a469f9e6) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35000#discussioncomment-14325257
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org