Skip to content

Add the fmt_image() function #1240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 9, 2023
Merged

Add the fmt_image() function #1240

merged 11 commits into from
Mar 9, 2023

Conversation

rich-iannone
Copy link
Member

Inserting graphics into tables currently is a bit more difficult than it should be. It requires a combination of text_transform() + web_image()/local_image() and it occurs late in the gt pipeline.

With fmt_image(), this process becomes quite a bit easier. The cell data need to point at filenames or have data that can be fashioned into filenames (through a file_pattern argument). An optional path can be provided to keep the required inputs minimal on the input table side. Multiple images can be inserted into individual body cells by having comma-separated file references.

@rich-iannone rich-iannone merged commit f34941c into master Mar 9, 2023
@rich-iannone rich-iannone deleted the fmt-image-fn branch March 9, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant