tools.image
Image insertion tool; it writes into the page itself. Needs the
annotations license feature. Takes an ImageConfig object (or true, the same as {}). types narrows what the Image tool accepts — the picker's file filter, its fine print ("PNG or JPEG · up to 2 MB") and the check on a chosen or supplied file all follow it.boolean | ImageConfigdefault on, within the mode
Example
imageTypeScript
tools: { image: { maxBytes: 2 * 1024 * 1024, types: ['image/png', 'image/jpeg'] } }
Options 2
The largest file accepted, in bytes. Whatever its size, an image whose header claims over 64 million pixels, or a side over 16384 px, is refused before it is decoded. A value that is not a positive number keeps the default.
MIME types accepted. A type outside the default five (SVG, for one) is refused whatever the list says. Types match without regard to case; a list with nothing valid left keeps the default five.