Skip to content

Function: isAllowedImageSrc() ​

ts
function isAllowedImageSrc(src, options?): boolean;

Whether src is acceptable for an image: http(s), a relative URL, or (when enabled) a raster data: URL. The schema enforces this everywhere, including on the server.

Parameters ​

ParameterType
srcunknown
options?ImageSourceOptions

Returns ​

boolean