<@ULVA73B9P> Artifact visualization is not renderi...
# marvin-ai
s
@Marvin Artifact visualization is not rendering well in the UI does the UI currently have some limits in the size of the artifacts?
m
thought for 246.7 seconds
Short answer: there isn’t a strict, hard-coded size limit for artifacts in Prefect 3.x, but there are practical limits that can affect rendering in the UI. What’s enforced today - Metadata values: truncated at ~500 characters per value (artifact metadata is stored as key/value strings; long values are trimmed). - Otherwise, no explicit size caps in code for markdown/table/link/image artifact bodies. Where you’ll hit practical limits - UI rendering: - Large tables (thousands of rows or very wide schemas) can cause slow load, sluggish scrolling, or browser memory spikes. - Very large markdown (multi-MB) can render slowly. - Images are loaded from the provided URL; page performance depends on image size and the browser. - Request size: - While Prefect doesn’t hard-cap artifact payload size, your environment may (e.g., reverse proxy, API gateway). If you’re on Cloud, there may be upstream limits. If self-hosted, NGINX/Load Balancer settings typically govern body size. Cloud vs OSS - Behavior and validation are the same. Any difference you see is usually due to infrastructure (e.g., gateway/proxy limits), not Prefect code. Recommended patterns for large artifacts - Prefer “preview + link to full data” instead of embedding everything in the artifact. - Tables: send a small slice (e.g., first 100–1000 rows) and link to full data in object storage. - Markdown reports: keep the artifact lightweight and link to a hosted HTML/markdown report. - Images: host externally and use
create_image_artifact
with a URL. Examples
Copy code
from prefect.artifacts import create_table_artifact, create_link_artifact, create_markdown_artifact

# 1) Table preview + link to full dataset
preview = df.head(200).to_dict(orient="records")
create_table_artifact(
    key="analysis-preview",
    table=preview,
    description="Preview of the first 200 rows. Full dataset linked below."
)
create_link_artifact(
    key="analysis-full",
    link="<https://s3.amazonaws.com/my-bucket/analysis.parquet>",
    link_text="Download full dataset (Parquet)"
)

# 2) Lightweight markdown with external link
create_markdown_artifact(
    key="report",
    markdown="## Summary\nSee the full interactive report <https://reports.acme.com/report-123|here>."
)
Next steps to help you - What artifact type is giving you trouble (table/markdown/image/link)? - Roughly how big is it (MB, or rows/columns)? - Are you on Prefect Cloud or self-hosted? - If possible, share a run ID or artifact ID so we can take a closer look. Docs - Artifacts overview: Artifacts docs - API reference (artifact helpers): prefect.artifacts API