• Resolved epcdomingos

    (@epcdomingos)


    Hi all,

    I’m trying to use photon in a featured image. This is the code:

    $post_thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
    echo '<img src="'. apply_filters( 'jetpack_photon_url', $post_thumbnail_src[0] , 'filter=grayscale' ) .'">';

    All goes well with photon deactivated, but when active I get this in the frontend:

    <img src="/?filter=grayscale=https://i0.wp.com/mysite.com/wp-content/uploads/2015/10/bike-and-guy.jpeg?fit=1200%2C9999" />

    The filter is being prepended to the url instead of being appended as a query string parameter.
    What am I doing wrong?

    Thanks in advance,

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Photon] Use photon with featured images’ is closed to new replies.