Pintrest button generating link to blank image.
-
The plugin is being used on this site:
https://andreafisherdesign.com/wp/gallery/early-1900s-print-fragonard/The link being generated for the pintrest button is:
https://www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fandreafisherdesign.com%2Fwp%2Fgallery%2Fearly-1900s-print-fragonard%2F&media=https%3A%2F%2Fs0.wp.com%2Fi%2Fblank.jpg&description=Antique%20print%20after%20FragonardSo its linking to this image (blank):
https://s0.wp.com/i/blank.jpgBut its supposed to link to this image:
https://andreafisherdesign.com/wp/wp-content/uploads/2014/08/TheSwingEngravingWithoutFrame21-615×593.jpgAnd as such, generate the following link:
https://www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fandreafisherdesign.com%2Fwp%2Fgallery%2Fearly-1900s-print-fragonard%2F&media=http%3A%2F%2Fandreafisherdesign.com%2Fwp%2Fwp-content%2Fuploads%2F2014%2F08%2FTheSwingEngravingWithoutFrame21-615×593.jpg&xm=h&xv=cr1.39.1&xuid=s1ptTnBca7CJ&description=Antique+print+after+Fragonard+I found the code where this is happening but I can’t figure out how to fix it.
public function get_name() { return __( 'Pinterest', 'jetpack' ); } public function get_image( $post ) { if ( class_exists( 'Jetpack_PostImages' ) ) { $image = Jetpack_PostImages::get_image( $post->ID, array( 'fallback_to_avatars' => true ) ); if ( ! empty( $image ) ) { return $image['src']; } } /** * Filters the default image used by the Pinterest Pin It share button. * * @module sharedaddy * * @since 3.6.0 * * @param string $url Default image URL. */ return apply_filters( 'jetpack_sharing_pinterest_default_image', 'https://s0.wp.com/i/blank.jpg' ); } public function get_external_url( $post ) { $url = 'https://www.pinterest.com/pin/create/button/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&media=' . rawurlencode( $this->get_image( $post ) ) . '&description=' . rawurlencode( $post->post_title ); /** * Filters the Pinterest share URL used in sharing button output. * * @module sharedaddy * * @since 3.6.0 * * @param string $url Pinterest share URL. */ return apply_filters( 'jetpack_sharing_pinterest_share_url', $url ); }
I’m guessing that it thinks there is no image to return? Any ideas on how to fix this?
- The topic ‘Pintrest button generating link to blank image.’ is closed to new replies.