[wp-trac] [WordPress Trac] #56969: decoding="async" breaks my site

WordPress Trac noreply at wordpress.org
Wed Nov 2 22:23:05 UTC 2022


#56969: decoding="async" breaks my site
--------------------------+------------------------------
 Reporter:  rodricus      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  6.1
 Severity:  critical      |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by rodricus):

 The problem was residing in my Slick Carousel initialisation:

 $('.section-service-slider .services').slick({
                 autoplay: false,
                 speed: 500,
                 infinite: true,
                 slidesToShow: 6,
                 slidesToScroll: 1,
                 prevArrow: "<button type='button' class='navigation-arrow
 slick-prev'><img decoding='async' src='" + arrow_url + "' /></button>",
                 nextArrow: "<button type='button' class='navigation-arrow
 slick-next'><img decoding='async' src='" + arrow_url + "' /></button>",
                 dots: false,
                 appendDots: false,
                 accessibility: false,
                 mobileFirst: false,


 WordPress somehow injected " decoding='async' " in the img element. If you
 change that to explicitly " decoding='sync' ", then the javascript-errors
 are resolved and the site-page works again.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56969#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list