Use getElementsByTagName for safer image parsing