Display an image using a URL or a relative path to an on-disk resource.

filter_image(image)

Arguments

image

A link or path to an image resource.

Examples

# Place an image (obtained via an image # link) within a rectangle element using # the `filter_image()` filter SVG(width = 500, height = 500) %>% svg_filter( id = "image", filters = list( filter_image( image = "https://www.r-project.org/logo/Rlogo.png" ) ) ) %>% svg_rect( x = 25, y = 25, width = "50%", height = "50%", attrs = svg_attrs_pres(filter = "image") )
#> Warning: Namespace prefix xlink for href on feImage is not defined [201]
#> <svg width="500" height="500"> #> <defs> #> <filter id="image" width="500" height="500"> #> <feImage xlink:href="https://www.r-project.org/logo/Rlogo.png"/> #> </filter> #> </defs> #> <rect x="25" y="25" width="50%" height="50%" filter="url(#image)"/> #> </svg>