There’s no need to store the URL in a custom field, the thumbnail id is already stored in a custom field under the key _thumbnail_id. You can fetch the ID via get_post_meta and use wp_get_attachment_image_src to get the URL.
Related Posts:
- How do I Add images uploaded in the post to a default custom field
- The the_post_thumbnail without srcset?
- Get the first image from post content (eg.: hotlinked images)
- Unexpected width and srcset attributes for the_post_thumbnail();
- How to set dimensions of the post thumbnails (featured images)
- Cannot get full thumbnail size using the_post_thumbnail
- Custom Field returning Numerical Value for Image rather than URL
- Reasons why all thumbnail sizes aren’t working
- Redirect to another page using contact form 7? [closed]
- How To Pick Custom Size Of Uploaded Image In Theme Via the_post_thumbnail();?
- How to disable thumbnail filter for a specific template part or image size?
- How to make excerpt image be full size instead of thumbnail?
- How can I scale down the width of images in bulk that are embedded in posts throughout the site?
- theme directory fallback image outputs url and not the image
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- I want to resize post featured image without cropping image. How?
- WP “optimizing” PNGs into thumbnails 5X larger than originals – FIX
- optimized PNGs 5X larger than originals
- WordPress Theme Preview Image
- How to add a checkbox element to attachments editor with example
- How to modify an image block in Gutenberg WordPress 5?
- How can I set image sizes and still have responsive images using the srcset attribute?
- Add default Backgrounds
- Edit srcset and sizes attributes in Gutenberg image, cover and gallery – blocks
- How to add a 2nd “featured image” to a post?
- wp_get_attachment_image_attributes not working for me
- How to get gallery images?
- How to change post thumbnail title and alt attributes to post title?
- add_image_size is scaling, even though crop is set to true
- Featured Image in 4.4 should be larger on mobile device
- How to use the responsive images feature from WP 4.4 in your themes
- How to handle thumbnails
- automatically set “Featured Image” the same as the og:i that is set in a custom field
- Replace Home with image link inside custom header menu
- Featured Image Size
- How to regenerate thumbnails when they’re stored on S3
- wp_get_attachment_image_src() width and height boolean
- Add url from Custom Field as ‘Featured Image’. Code not working
- How to float an image in Gutenberg
- A mystery 300px image size
- Can’t show custom post thumbnail sizes as background images
- Custom post fields
- Featured Images are not able to be set
- How to make a local cache of mshots images
- image url relative path not working in css file
- Custom Field created in add_meta_boxes reappearing itself again in the default Custom Metabox
- How do you replace content generated by custom fields with custom blocks in Block Editor?
- Sort wp_query by sum of two meta fields
- What’s the best practice way of handling custom fields in different post formats?
- Responsive Images – crop don’t seem to work
- Reactor Theme: Prevent Post Thumb on Post
- Inserting images in multiple posts native gallery
- Can I get the ID of an inserted / linked image?
- Add attachment for all images in post
- For homepage images (for small business website), is it better to use custom fields or post_thumbnail?
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Where WordPress Stores The Custom Fields Values
- Getting Different Size Of Attachment Images
- Issue on Getting Custom post type Thumbnail’s URL
- Change image size depending on page
- How to obfuscate theme directory URLs
- the_post_thumbnail() get the URL to the “medium” sized image
- Are seven additional image sizes are too many?
- What is the best way to build home pages with a lot of sections for distributable themes [closed]
- Theme logo metadata into template file
- How to add post meta fields to an article’s as meta elements
- Full width featured thumbnail
- Injecting pre-defined text from custom page template to editor
- How to use shortcode inside of shortcode in theme
- Stop WordPress from showing images on non post pages
- How to add cropped custom header image?
- Is there a way to serve different resolution images to different devices?
- Selectively hiding or allowing thumbnails of featured images on front page
- Dynamic Image Links Depending on Excerpt/’Single Post’ View
- How can I add a field for featured image on backend of a custom Taxonomy?
- Post Featured Image Custom Sizing?
- Image cropping isn’t working correctly when using Offload Media
- How to add an image to a theme page template in code?
- Created blank theme for REST API, featured image not appearing on admin side
- How to fix a conflict cause by my theme with Woocommerce and/or Gravity Forms?
- Responsive Images with art direction
- Customizer Image-Picker Preview Not Working
- Make a custom field in admin post.php read only
- Can’t upload images on new theme
- image sizes – finding and removing
- Full width thumbnail
- Adding a Class to an Getting From Post Content
- Featured Image Module Randomly Disappears
- How to add custom field option with menu?
- Single Featured Image Repeating
- How do I keep images in posts below a certain size without editing the post?
- Add custom field to existing meta box?
- the_post_thumbnail fetches wrong image
- apply_filters to featured image
- Show post thumbnail only if it exists using timthumb
- How to mark a image attachment as background image?
- How can I add a single image from a gallery into the page header?
- Isotope overlapping .items because of featured images – HELP! [closed]
- Crop custom image size vs actual size
- Convert base64 string to WordPress attachment uploads multiple images instead of a single one