How to get the cdn url?
-
Hello I’m aware that I can pull off the image of a post and then display a download image link under the post, but I get the casual download link from my website.
How to reach the CDN version of the image ?
Thank you!function my_download_featured_image_link_after_content( $content ) { if ( is_singe() || has_post_thumbnail() ) { return $content . sprintf( '<a class="download_image" href="%s">%s</a>', esc_url( get_the_post_thumbnail_url(null, 'full') ), esc_html__( 'Download featured image', 'textdomain' ) ); } else { return $content; } } add_filter( 'the_content', 'my_download_featured_image_link_after_content' );
- The topic ‘How to get the cdn url?’ is closed to new replies.