If I produce a static asset (e.g. image, SVG) in a...
# flyte-support
r
If I produce a static asset (e.g. image, SVG) in a task and want to render that to a deck, what path should I provide in the HTML string? Currently my image is written to a shared mounted volume on our task pods, so I have something like:
Copy code
deck = flytekit.Deck("Profiling Results")
                deck.append(f"<img src={os.path.join(_SHARED_VOLUME_PATH, "<image_name>.svg")}>")
                flytekit.current_context().decks.append(deck)
but I believe the temp dir in which the HTML for the deck is written to will not have any access to this shared dir, at a minimum
Ah, I see that the preferred/currently supported method seems to be to encode the image as a base64 string: https://docs.flyte.org/en/latest/user_guide/development_lifecycle/decks.html#image-renderer
a
Right @red-holiday-95178. Does that answer your question?
r
It is sufficient, yes. I can imagine if I wasn't satisfied with encoding vector graphics as, say, a PNG, that this could be an issue -- but in my case it works at the moment