If you want to show the File type of featured image. then try the below code.
<?php
$id1 = get_post_thumbnail_id($post->ID);
$type = get_post_mime_type( $id1 );
$mime_type = explode("https://wordpress.stackexchange.com/", $type);
$type=".".$mime_type['1'];
echo $type;
?>
It will display the exact extension that you want “.jpeg” from “image/jpeg”
Here “$post->ID” is current post id (or the id of the post whose featured image you want ).
Check if it works for you.
Related Posts:
- Find posts without featured image? [duplicate]
- How to get relative URL of medium sized featured image?
- How to set the width and height rule for featured image
- Gutenberg editor get post featured image by id
- Big Image on Featured Post, Normal on Single Post
- How to use photo in multiple posts?
- Setup Featured image on all posts from thesis thesis_post_image custom field?
- How do I link a featured photo to it’s post?
- Title image is missing ( but is not the WP 3.5 issue )
- Orientation of featured image in post?
- How to show file size of featured image? [duplicate]
- Set default image sizes in WordPress to hard crop
- Remove images (files) that were generated when using add_image_size()
- Displaying images from external RSS feeds?
- Which action hook can I use when a featured image has been selected
- Is there a way to define a default caption to all uploaded images
- How can I add the “Use as featured image” to a custom metabox?
- Image resize with image url
- Preview Image Path in Admin Section
- The WordPress Gallery, Grabbing The Link and Images?
- Featured Images on Front Page
- How to place an image into header.php? [closed]
- Uploading an image as featured image from frontend form
- How to upload images from my directory into my wordpress?
- Ability to edit image via WYSIWYG
- Add a featured image in my theme?
- @wordpress/create-block image url in css
- How does WordPress work out the srcsets?
- help getting featured image using get_posts
- Why can I not view image attachment pages?
- Images are randomly deleted from server
- Restrict Image Uploads to a Certain File Type
- Rename media files generated during upload
- Image popup in a lightbox / overlay from the backend 3.5 admin area (plugin)
- Auto resize images after adding a new size
- media sideload image and Google Content
- How to display alt tags in img src?
- Making images in posts link to the image file rather than the attachment page
- offload media to external services [closed]
- How can I insert an image map into a WordPress blog post?
- How to create ‘Local’ filters for WordPress srcset sizes in template parts?
- Jetpack’s photon causes local site to try and serve images from WordPress CDN [closed]
- How to stop wordpress always displaying full-res images
- Transfer only original images to new site
- How to filter the image embed code based on link type
- Include image in excerpt
- Retain the original name of the image on resize
- Rewrite all article pictures to link to file
- Upload box media size not working
- Featured images disappear after DB export/import?
- Creating a post image to show in a gallery
- Don’t show images inserted into content
- Replace post/page titles with an image in WordPress
- What happened to the media manger?
- I want to Add My Product Image to Admin Order Email in Woocommerece [closed]
- Remove Image Sizes in Media Settings Page
- image_resize() with blank space [closed]
- Re-ordering images in existing post in wordpress 3.6.1
- Change Image folder Locations
- “HTTP Error” or Network Error (tcp_error) when uploading image
- Optimising uploads folder then re-uploading?
- Changing Image Size Settings does not show in Image Details
- Get the URL, width and height of an image where the width and height are a specified minimum
- Metabox image upload value
- image_downsize returning an Array?
- Why is WordPress automatically modifying image URLs? (Tracking pixel from RSS)
- Add images to my theme with html
- How to disable a WP Image Block to link to itself?
- Is there a layout to place 2 same sized images in two columns on the WordPress page?
- How to change an image source when rendering on frontend?
- Images going blank after a while
- Confused about image sizes generated by WordPress
- Allow users to upload and display multiple photos
- Initializing the cropper for image uploads
- WordPress on IIS works except for image upload widget: Win 10 Pro
- attachment_fields_to_save first parameter is null
- ADD class to all my images (thumbail)
- How to show a full page when someone links directly to an image on my site
- The image keep redirect to my previous URL after I moving my site
- I cannot upload images to post or the media library in wordpress
- Can i use my Old Post image URL in my new post?
- Responsive Featured Images Not Working
- How can we achieve this image css style?
- WordPress 404 Images – Images not found after deleted from media
- How to delete images from database with product
- How to Make Only Images Connected to a Post Show? Not Entire Media Collection?
- Bypass wp_safe_remote_get()?
- Redirect Causes Missing Images
- Specify which image sizes are created on a per image basis
- What is the Best way to post each pictures uploaded separately and automatically?
- Show WordPress Image Title Under Custom Portfolio Image
- Extract url from next_image_link
- Rename uploads filenames to POST-ID on upload
- Why images are disappearing on WordPress web site?
- How to include featured image on blog post preview?
- Resizing to bigger proportions as original not working
- Hover images and Videos
- Media Library shows default image instead of image preview
- Profile Image displaying on Wrong side of WordPress Navigation Menu
- How to add image alt attribute to the thumbnail code