I ended up using the following to solve my problem.
<?php $image_id = get_post_thumbnail_id(); ?>
<?php $image_attributes = wp_get_attachment_image_src( $image_id, 'full'); ?>
<img src="https://wordpress.stackexchange.com/questions/65569/<?php echo $image_attributes[0]; ?>" width="100%">
Related Posts:
- Filter to remove image dimension attributes?
- WordPress adding scaled images that don’t exist (1536×1536 and 2048×2048)
- Using Images in WordPress – Best Practices
- Image Scaling using get_the_post_thumbnail issue in WordPress
- Prevent large image uploads
- Modifying an uploaded image with ‘wp_get_image_editor’ and ‘wp_handle_upload_prefilter’
- How do I delete all generated images from my server except those currently used in posts
- Change the output for [gallery] shortcode
- Downsizing Many Large Images Attached to Posts, in Bulk?
- Disabling auto-resizing of uploaded images
- How do I delete thousands of unattached images?
- Wrong domain in uploads folder
- How can i alter the amount of different images sizes being stored?
- How to force WordPress to add new images at the beginning of the gallery?
- Re-process Images
- How to install Imagick or resolve issue
- Passing srcset to image attachment method
- Why is wordpress searching for @2x images?
- Responsive Images Resizing Images
- Broken urls with http site and https wp-admin
- Image File Names
- Images in upload folder with hexadecimal names
- JavaScript and images files are not recognized
- Gallery post images on homepage?
- How to extract image width from add_image_size?
- Link to full size image or attachment page in photo theme
- Add “data-” attribute to image links
- How can I make all post image uploads have data-width and data-height attributes automatically by default?
- How to remove Geo Tagging on image uploads, but not other EXIF data?
- How to output images as figure/figcaption
- Make Images appear in the same order as in media browser using get children?
- How to wrap normal image tag with figure HTML5 element
- Update old Post image metadata to ‘thumbnail’ wp_attached_file
- How to find images in lazyload to set alt attribute?
- having issue while uploading An error occured in the upload. Please try again later
- Control Responsive Images
- How to throw admin notice error on image upload
- Get size of smaller image version
- How to add an image to the post preview in the free theme “food recipes”
- I am getting useless alphabets in images link
- How to replace images?
- The alt=”” attribute is empty
- Add custom text in the media library image meta area
- Unable to upload images to the Media Library. Getting this erron on the console wp-admin/async-upload.php 403 (Forbidden)
- how to move from content and place them elsewhere on a page template?
- Images showing in editor but not in post [closed]
- Why are featured images sometimes cropped, and sometimes not
- Call to undefined function wp_generate_attachment_metadata()
- the_post_thumbnail(‘medium’) setting some images width=1 height=1
- Help with resizing of featured images on WooCommerce homepage
- How to set uploaded image as featured image wordpress
- Random background image showing on website per click/load
- Why WordPress suddenly changed sizes of thumbnails?
- How to force WordPress to upscale images?
- How to stop WordPress from completely overriding my tags in my templates?
- Number of Style for Image Added into Post
- How can i add a section of category image upload during adding of category in wp admin area?
- remove enclosure url from feed
- the_content not showing responsive image attributes srcset or sizes
- add_image_size not working
- Show last 12 uploaded images on home page, but only from posts
- How to change the value “uploaded to” in the media library (WordPress 4.0)
- Thumbnails different sizes
- For a complete backup, is it enough to copy htdocs and export database?
- What exactly is the description field when uploading an image?
- Photos automatically uploaded to Media Library
- Failed to load resource:404 image
- Slidedeck Pro WordPress Image Size
- Thumbnail and image management
- Place image caption outside of figure tag (Gutenburg Image Markup)
- Change Image Size option in the settings in bulk
- Crop tool do not work
- Profile image does not upload
- Allow wp media library to check already selected images displayed in div
- How is called this thumbnail slider feature
- Rebuilding core image block
- Custom image size with srcset
- Auto Generate Thumbnail
- Images not loading on webpage, and links to other media give 404 Not Found
- Loading and Referencing Images
- ALT attribute in menu images
- Import images from old WordPress site into new site
- Images 404 after wp migration to a subdomain
- Custom image sizes quality
- built-in responsive images in content – do I need to add anything to functions.php?
- Widget media uploader doesn’t opens after widget save
- How to source control manage site images
- Query Image File of a Different Size
- How to display image thumbnails on the search results page?
- How to modify images during upload
- Get custom size of thumbnails
- Change Featured Image Size of the Post
- Surround uploaded image link with div
- Why WordPress doesn’t show pictures when I upload them in a new post?
- greater flexibility in targeting images attached to page
- how do i update version for super skeleton
- Generate / attach Image srcsets from ACF Image Field
- Is there a way to upscale a media library original image to the nearest whole pixel in WordPress?
- How to make Media Library files private?
- How to add embed image in comments?