Skip non-`img` nodes when using `options.elements`

Prevent processing when `options.elements` contains non-`img` nodes.