Just keep in mind this is only going to get you the image ID, but it should do the trick… does in my circumstance at least.
// switch to the correct blog
switch_to_blog( $site -> blog_id );
// pull in our db global
global $wpdb;
// get the image ID
$_image_id = $wpdb -> get_col( $wpdb -> prepare( "SELECT ID FROM $wpdb->posts WHERE guid='%s';", get_theme_mod( 'white_logo' ) ) );
// switch back to the original blog
restore_current_blog( );
Related Posts:
- remove or update add_image_size
- get the attachement url for the medium sized image
- Is there a simple way to just insert a link to an image (without inserting an image)?
- Watermarking Images with WordPress with WP_Image_Editor
- add_image_sizes ignoring crop sizes and using proportion
- Get attachment ID of author_meta image – Attachment Metadata
- Black and White thumbnails
- Alter image output in content
- How can I remove the image attachment ALT field?
- Download button for Featured Image in every post – automatically
- Change html structure of all img tags in WordPress
- Get a list of all image sizes that match aspect ratio of original one
- Insert image in comment reply
- Randomly add a ‘ul’ list of images
- Screenshot.png not showing up
- Include photos in WordPress blog posts without uploading to Media Library
- Thumbnails are bigger in size than the original image
- The the post id from image id
- Add attribute to caption shortcode from custom attachment field
- Get an image’s alt text in a shortcode using the image URL
- function to show only featured image of the posts
- Image resize depending on orientation?
- Character Limit w/ Excerpt removes Images Why?
- Featured images not displaying at full resolution
- Check if the image exists in WordPress media library
- Is there any action/filter hook to use when an image gets edited in the editor?
- Faster way to put images into a blog post by using Add Media dialog
- Changing default img html markup but not in admin back-end?
- Retrieve an array of image URLs that belong to a gallery
- Change align classes for images
- Ho to add “Create Slider” option to default “Add Media” popup?
- Images in Blog List
- Using featured img as div background
- How can I change get_the_post_thumbnail to make 100% width image?
- Native gallery sorting is ignored
- Display an icon with get_post_meta?
- Include WooCommerce 2’s prettyphoto scripts on all site pages
- Get custom thumbnail sizes [duplicate]
- Using Jetpack carousel w/o creating a gallery [closed]
- Where do I locate theme image files
- WordPress Facebook Open Graph plugin not working for 1 specific image [closed]
- Custom responsive ‘featured image’ sizes
- removing the featured image from the post
- Dynamic image crop in WP 3.0+?
- What can i do add title to ‘large’ image?
- Warning : tempnam() [function.tempnam]: SAFE MODE Restriction in effect
- Image text wrap not working properly on frontend
- WordPress cutting images size
- How to set minimum required size for featured image?
- Errors and warning with padlock sign when site moved to SSL
- How to make footer area transparent? Using Avada and WordPress [closed]
- Whats causing image quality to be degraded?
- Exclude image url from search query
- Fancybox just loading small white square
- WordPress Resize Image and show as thumb in post
- Resize uploaded images [duplicate]
- Image “description” and SEO within WP
- Link to full-size image for subscriber only
- Indicate image sizes for upload by post type
- Why can’t I gain access to my homepage images?
- Fullscreen Page Background without Plugin [closed]
- Allow a specific user role I have created to only upload one image to his media library
- Implementing a modal(lightbox) for all images in all post-gallery posts
- how to regenerate webp et-pb-portfolio-image
- How do I avoid color distortion of uploaded images?
- Where to put code that customizes API
- When upload a PNG a noise appears in the thumbnails
- How to auto add image caption from image alt?
- How to stop TinyMce from converting image url into ?
- How to automatically load an image inside the post, since it is present in uploads folder
- Decide how Hero image appears on mobile
- Broken images/videos after migration – DIVI theme- works ok on Mac OS
- Get “Image CSS Class” value from the Advanced Options section
- After reinstalling wordpress images do not appear in posts?
- Can’t figure out how to get space around an image? [closed]
- Show images from TEXT section on PAGE wordpress
- Where to add my code to auto attach images to existing products
- Set WordPress to Create different images format later, not during upload
- If file exists with page slug name show image else nothing
- Issue uploading images
- How can I use images that are on the server locally?
- Image filter works on attachement pages but not posts. I can’t get the image ID
- page displaying media caption shortcodes
- Display different Images depending on the current day
- How to add a credit line to a photo caption
- Get images uploaded to this post in popup on editor screen
- Uploading Images for a section
- Some images suddenly not appearing
- Paginate Gallery [closed]
- How do I add a nested conditional within an echo – to use a default image if there isn’t one in the post?
- WordPress: Preload next post images
- Set add_image_size() greater than content width in media box
- Blurry Images WordPress 5.8.1
- Theme using masonry layout script rendering overlaped images in Google Chrome [closed]
- Why is inline CSS added to images automatically? [closed]
- What does WordPress media uploader do to image files on upload?
- Site header logo and parallax image on homepage do not display on iPhone
- WP_Image_Editor – How to save the new size of the image in the sizes metadata
- Is is possible to append .webp to srcset images using wp_filter_content_tags()?
- Could a very long article slow down all website and wpadmin?