QImageReader might report PDF as a viable image type, if Qt is dynamically linked and QtWebEngine is installed. Fixed by additionally checking the mime type. Fixes #8102