Well you have the ID as $attach_id
so you can use a function such as wp_get_attachment_url()
where you can pass $attach_id
and get a url returned:
$featured_url = wp_get_attachment_url( $attach_id );
Or if you want more information such as width, height, etc. you can use functions like wp_get_attachment_image_src()
or wp_get_attachment_metadata()
.
Related Posts:
- How to change upload directory in wp_handle_upload
- Uploading media with the REST API
- Decrease file size upload in Media
- Adding a custom image upload size and making it selected by default?
- Change the filename format of saved featured images
- Image Upload “exceeds the maximum upload size for this site”, but php.ini is correct
- How to register images uploaded via FTP in media library?
- Failed media upload: “The uploaded file was only partially uploaded.”
- Create Image Uploader for Widget
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Debugging upload problem: What part of WP does actual image-resizing?
- How to resize image on client-side before upload?
- Specified file failed upload test. wp_upload_handle
- How to upload imagick resource to media in wordpress
- Accessing a random image via ajax
- Make WordPress upload directory outside wordpress root with custom url
- Is it unsafe to put php in the /wp-content/uploads directory?
- Upload images and attachments from frontend form
- Image upload via FTP to wordpress media library
- WordPress media upload “HTTP error”
- Adding featured image via PHP
- Restrict WordPress File Type Uploads by User Type
- File upload, uploads only file name
- Modify Maximum upload file size text
- Use WordPress’s Media Uploader/ Manager in non WordPress php application
- Upload a json file in php [closed]
- Custom image upload
- wp_handle_upload – The uploaded file could not be moved to wp-content/uploads/2012/09
- is it possible to force wordpress to always save thumbnails as ‘jpg’ not ‘png’
- Get most recent media upload
- Convert all images to PNG on file upload
- Upload Image in a WordPress page using PHP
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- Using file_get_contents with Gravity Forms uploads folder to create images in the media library returning false
- how to retrieve uploaded url of zip files
- Why is $_REQUEST an empty array in admin-ajax.php?
- How to upload a file to a folder named after the user_id via plugin
- Upload multiple images to a Woocomerce product
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- Upload file could not be moved to wp-content/uploads
- Enable custom logo upload if logo is not in header
- NGINX rewrite rules for multisite
- How do I get around “Sorry, this file type is not permitted for security reasons”?
- Change WordPress Upload Folder using wp handle upload
- How do I Import / Upload Files with jQuery AJAX?
- WordPress automatically adds links to uploaded images
- WordPress function when file is uploaded, deleted or edited
- Blob file download problem
- zip unzip attachments in wordpress
- Upload multiple files in randomly generated folder using wp_upload_bits
- Can’t upload CSV file to plugin directory using custom upload form in admin panel
- WordPress upload file size error even after raising php limits
- Get uploaded image and attach it to the new post
- Get featured image with custom size outside WordPress
- Why is my max_upload_filesize being limited to 2M? [duplicate]
- Images Uploaded saving onto older/previous year folders
- How do I increase the upload size only when editing special pages?
- Convert canvas to image and upload image to server
- How to get the filename from file system and create a download link?
- WordPress İmages Upload & Delete Error
- Allow user to Upload image and manipulate it on the frontend
- How to Make Thumbnail of Post Stay Animated
- Convert all uploaded PNG files to PNG-8 format
- How to decrease the max file upload size without using php.ini or htaccess?
- Some problems in custom widget
- Checking page before applying image restrictions while uploading
- Change image data durgin upload
- Hook on file upload
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- I can’t set image ad fatured programatically
- How can I update WordPress plugins or WordPress itself in all server?
- async upload not working when not logged
- WordPress loading all local images from specific directory?
- Trying to generate a CSS file in wordpress uploads folder
- Maximum file Upload
- Sudden Upload HTTP errors, PHP uploads and memory limits are already to high to my taste. Anything else?
- Change upload URL by mime type
- Right path for renaming a file in uploads folder
- I want url from a file in media using title file
- WordPress file upload
- Crop an image after upload on custom account page
- media_handle_upload fails with gravity form submitted image
- Restrict File Type Uploads by User on Wordress via functions.php
- wp_delete_attachment not working with multiple values
- Renaming “Expand Details” within “Add Media”
- Save the outputted image into the Media Library, with a different filename and extension
- 403 (Forbidden) delete file image in themer folder
- Is custom behaviour possible when asynchronously uploading?
- How to resize an image server-side before upload?
- WordPress will suddenly stop saving files uploaded by my code (ran in nopriv ajax)
- Name Input from widget displays Sidebar name instead of saved data
- Can’t upload files
- File Upload with Server in safe_mode
- Edit Image/Image Details – Replace button missing
- Correct Syntax for uploading files to custom directory in WordPress
- How to automatically convert images to WebP on WordPress?
- WordPress directories not writable after PHP version upgrade
- Upload multiple files via ajax from an HTML file input
- get_post_meta returns on side but it doesn’t return on bottom of admin page