• Resolved Eric Karkovack

    (@karks88)


    Hi, I’m testing this plugin out on a development site. I have an image set for the home page, but see the following console error:

    Preload of xxx.xxx.xxx ignored due to unknown “as” or “type” values, or non-matching “media” attribute.

    Looking at the source code, the type="" attribute is indeed empty. Does this impact the page’s performance?

    It also doesn’t appear that the mobile image is preloaded. Then again, I’m checking on a desktop.

    I’m using the GeneratePress theme. Also using the Block Visibility plugin to determine which LCP image shows up on a given device.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rhys Wynne

    (@rhyswynne)

    Hi Eric,

    Are you using any plugin to generate any sort of WebP? Or serve images differently?

    I think there’s a potential bug in something like WebP Express in that it doesn’t detect the file type. I am working on a fix that will allow you to specify the file type explicitly, which will be a bit of a workaround but seems to be a bit of an edge case (though oddly reported twice in the last 24 hours, so I suspect it may be something to do with WordPress 6.4.3…).

    The mobile image will only be preloaded on mobiles (or if you send a mobile agent, basically using wp_is_mobile()), so that’s expected behaviour.

    Thread Starter Eric Karkovack

    (@karks88)

    Hi Rhys,

    Thanks for your help!

    About the only thing different here is that I’m using GeneratePress Elements to create the hero image at the top of the page:
    https://docs.generatepress.com/article/block-element-overview/

    Their Elements are separate posts that get merged into a page via a hook. So maybe that’s it?

    Otherwise, there’s no webp image conversion going on.

    Thanks!
    Eric

    Plugin Author Rhys Wynne

    (@rhyswynne)

    Hi Eric,

    Thanks for your patience.

    I’ve got a fix, but I’ve been unable to push it to the WordPress repository just yet, but I’ve uploaded it to Github if you want to preview it and comfortable with downloading a plugin from there?

    I should push it in the next week or two when my life is a bit less hectic!

    Thread Starter Eric Karkovack

    (@karks88)

    Thanks Rhys, this new version fixed the issue!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Browser Console Error’ is closed to new replies.