It appears that $field[‘custom_image’] isn’t passing what you want it to. The returned values do not appear to be correct.
You want to put the key of the meta value you need as the second variable in the get_post_meta() function, for example:
$image_upload = get_post_meta($post->ID, '_my_image_id', true);
Each custom meta field you create has a unique identifier, thats the value you want to pass in.
You should also check to see if the returned value of $image_upload is false, in which case the meta was not set for that particular post.
Related Posts:
- Upload multiple images in a custom metabox
- Adding upload button in metabox
- problem with updating metabox of upload image
- Upload button in metabox not working
- How to delete resized (cropped) image uploads and prevent future resizing?
- After Moving a Site to Another Domain, All Images Are Lost
- Is there a hook which fires after all thumbnails are generated?
- Using Images in WordPress – Best Practices
- Prevent large image uploads
- Modifying an uploaded image with ‘wp_get_image_editor’ and ‘wp_handle_upload_prefilter’
- Prevent image upload unless exact size
- Use Media upload in custom widget on wordpress 3.5
- How to copy and paste a picture found on the web to wordpress easily
- How can I add the “Use as featured image” to a custom metabox?
- Image resize with image url
- How can you upload an image from within a settings page?
- How to increase media image scale limit?
- How to upload image without post ID using the new media uploader?
- Uploading an image as featured image from frontend form
- How to upload images from my directory into my wordpress?
- could not upload image in media library
- Uploading images: ‘ø’ get replaced with ‘ø’
- Why images/photos after being uploaded to my wordpress site get slightly blurry?
- SSL: How to make customizer images Protocol Relative in WordPress?
- Metabox with multiple fields added by user and upload box
- Images in upload folder with hexadecimal names
- Restrict Image Uploads to a Certain File Type
- Rename media files generated during upload
- add_image_size() to crop images into squares?
- wordpress media library shows empty images
- Upload .doc to blog
- How to remove Geo Tagging on image uploads, but not other EXIF data?
- media sideload image and Google Content
- How to Create an Image Upload Box for Custom Posts?
- image in my post disappeared after I upload website to remote server
- Disable all resizing and compression
- Loose images in uploads folder
- Force minimum image size and aspect ratio when uploading images
- having issue while uploading An error occured in the upload. Please try again later
- Convert uploaded GIF to non animated image automatically
- Is it possible to split Default WP Media directory to multiple Folder/Subdomain?
- Ho to add “Create Slider” option to default “Add Media” popup?
- Images in Media aren’t showing, not broken
- How to replace images?
- Upload Image using wp_insert_attachment and file url don’t have file extension
- using media_sideload_image with a file from theme directory
- Is there any way to Integrate WordPress with Imgur for Image Hosting
- Blank upload.php page
- Upload image without media-upload [duplicate]
- Tinymce and uploading local pictures
- Unable to upload images to the Media Library. Getting this erron on the console wp-admin/async-upload.php 403 (Forbidden)
- Add custom metabox to media library images
- Images give 404 after changing default domain
- How to set uploaded image as featured image wordpress
- Create a post from every image in my media gallery
- Autosort uploads in galleries by filename
- Change Image folder Locations
- WordPress Featured Image meta box not showing
- “HTTP Error” or Network Error (tcp_error) when uploading image
- Images uploading from media going in wrong folder
- How does wordpress name resized image copies?
- How to change the value “uploaded to” in the media library (WordPress 4.0)
- adding image to post thumbnail from another server
- Making a parent directory writable by the server
- Indicate image sizes for upload by post type
- How to display a warning when an uploaded image is too small?
- User uploads image as “Featured Image” but WordPress resizes it?
- Profile image does not upload
- Large uploaded images not resizing?
- Form File Upload Field generates multiple copies of Image Files (different sizes): Is this a WP feature or is this being done by the Plugin
- Upload error on localhost (at minimum, not yet tested online)
- Unset image sizes before images are uploaded
- Loading and Referencing Images
- unsharp thumbnails after uploading image
- How to delete original image file after upload and resize
- An error has occurred during the upload process in wordpress version 5.3.2
- An error has occurred during the upload process in wordpress 5.3.2
- Import images from old WordPress site into new site
- featured image in custom poste type (backend)
- How to handle a lot of media files in the uploads folder? (+10.000)
- Widget media uploader doesn’t opens after widget save
- Getting the Select and Crop Functionality Using Custom Fields
- How to modify images during upload
- Set WordPress to Create different images format later, not during upload
- After I upload a file to library its name converted to dashes
- Reduce Mobile Image upload size (wordpress)
- Only User Upload image Http Error
- Add two images with Sweet Testimonials
- See the all uploaded images of a user as an admin
- Broken Media Library
- Utilise WP_Customize_Image_Control to only show image picker
- 3.5.x Theme Customize: Handling Custom Control Requests
- Import existing image as a single post
- Custom filename when pasting an image from clipboard
- Adding different classes to different images depending on size for fine control of image layout in posts
- Media Library is not loading on grid view in admin panel
- Media upload error
- Best Photoshop-WordPress workflow for editing images without re-upload [closed]
- Can’t upload svg files in WordPress
- Random images from uploads folder and subfolder