Replace “get_the_post_thumbnail_url()” with below
wp_get_attachment_image_src( get_post_thumbnail_id( $posts->ID ),"thumbnail")[0];
OR
get_the_post_thumbnail_url(get_the_ID(),"thumbnail");
Related Posts:
- How do I change/modify the_post_thumbnail(); html output?
- What’s the best way to use the Featured Image for responsive web design?
- Adding Featured Image to Post programatically
- How to upload imagick resource to media in wordpress
- How do I get images (with a thumbnail preview) to show in search results?
- Assign a picture URL to a page via PHP
- How to scale image with equal width and height without distortion?
- Echo URL of large version of Featured Image
- Recent posts with featured image or fallback image with permalink
- Set the background to a default image if there isn’t a specified “featured image”
- Redirect to another page using contact form 7? [closed]
- Three Questions with Twenty Eleven theme
- Resize image to specific dimension (X to Y ratio)
- Help Fallback (thumbnail)
- Shortcode function doesnt work without caption
- Get featured image with custom size outside WordPress
- Else/If Statement to Display Photo Descriptions
- How to set a featured image (thumbnail) with PHP?
- Generate responsive post thumbnails of same size
- How to Make Thumbnail of Post Stay Animated
- not outputting medium size image URL
- Resize post thumbnail
- How to add a PHP scripts into WordPress
- add class to background image
- Overwriting a Shortcode
- Setting post thumbnail sizes in template file and functions.php
- add if statement to the featured image
- Remove default Image Sizes
- Generate and upload screenshot as featured image for user-submitted post
- How to add a shortcode for an image in the following function
- Restricting Image Upload Sizes using ‘wp_handle_upload_prefilter’ – Stuck media progress bar when Featured Image?
- Showing a different gallery in a seperate post
- How to display posts by current user in a drop down
- Mass update excerpt
- Create own WordPress shortcode gallery
- How to control WordPress image metadata (using Imagick)?
- Get value from shortcode to do something
- PHP variable = get_the_post_thumbnail_url outputting without slashes
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- How to display data from custom table in wordpress phpmyadmin
- Calculating a large number of MYSQL queries as customshort codes, slow
- Is it possible to use Data URI image to set a post thumbnail?
- Get the post ID and display the images
- WP Post-Thumbnail
- Responsive Header for Phone
- Reprinting tags with all attributes
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- Colon is Missing In My Website Url in WordPress
- How to get next image with this code from same post?
- Unread Repeater field IMG alt not working
- Can’t upload image using media_sideload_image
- Custom shortcode outputs plain text instead of HTML at top of post
- How to use wp_add_inline_style for custom CSS added via shortcode?
- Upload multiple images to a Woocomerce product
- How to use thumbnail size of image if I’m only using src to get image
- Pass php dynamic variable to shortcode
- How can I dynamically update the class in my shortcode?
- Creating own shortcode – echoeing php variable based on JS variable
- Display custom post type title as text if post thumbnail is not available
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- Accessing an image folder inside public web directory
- get_children displaying images removed from the page
- Why is image hard cropping for one image using add_image_size not working?
- Enable custom logo upload if logo is not in header
- Why my image upload button is not working in wordpress widget area?
- How create a Shortcode with hover and complex options
- Remove from shortcode
- Displaying recent posts on static page with template-part via shortcode
- wordpress 4.4 self hosted video (html5) doesn’t show
- do_shortcode with custom field
- Scrape external webpage for first image and add it to new post
- How to make own crop image function for WordPress plugin
- “imagejpeg” function is not working in wordpress
- Display image from an external rss feed on wordpress without plugins
- How to Reference/Echo Variable from Another PHP Function
- Remove echo from shortcode
- Replace shortcode in substring
- Shortcode to show the code
- Shortcode returns values in the wrong order
- WordPress automatically adds links to uploaded images
- post thumbnail, conditions, else wont work
- Get URL from shortcode tag
- Embedding PHP in shortcode $content
- WordPress function when file is uploaded, deleted or edited
- Shortcode with PHP issue “Undefined index”
- ‘Post-thumbnails’ feature does not seem to register
- height should be set to auto to avoid pixelation in the post thumbnail function
- Excecuting php function in shortcode
- Only first shortcode gets executed
- Multiple do_shortcode in page template
- Download images from media library to computer in BULK?
- Returning data instead of echoing/printing
- echo something inside a shortcode
- Display related posts without a plugin
- displaying content that includes shortcodes within an echo
- List taxonomy term slugs within shortcode (do_shortcode)
- Shortcode from a function not working
- Display Data in Table from External Database in WP using Shortcodes
- get_posts works in the page template but not in a shortcode