Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1165108

    dave.sitesol
    Participant

    I’ve been trying to make use of WordPress’s built in responsive images that were added to the core last year within some custom child themes using X. Unfortunately one of the crucial functions wp_get_attachment_image_srcset() appears to be broken when used in X theme. It always returns false when running X theme or a child theme. It seems to break at line 1173 of /wp-includes/media.php in WP 4.6.1. The call to apply_filters() constantly returns empty.

    #1165745

    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    It’s intentionally disabled to allow X theme use its own image sizes. But you can enable it by adding this code to your child theme’s functions.php

    function x_disable_wp_image_srcset( ) {}

    Hope this helps.

    #1167042

    dave.sitesol
    Participant

    What affect will this have on images output by X theme?

    #1167564

    Rad
    Moderator

    Hi there,

    It will change the image sizes that X theme usually displays. Some may appear blurry if the picked size is not appropriate screen size. But it shouldn’t affect the overall functionality.

    Thanks!