• Log In
  • Register
  • Notifications
Skip to content
  • Pods
  • About
  • Docs
  • Blog
  • Support
  • Donate
Pods Docs
Pods Docs
  • Videos
  • FAQs
  • Code Snippets
  • Tutorials
  • Code Reference

pods_image_id_from_field

Get the Attachment ID for a specific image field

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)

Documentation » Code Reference » Media Functions » pods_image_id_from_field

Get the Attachment ID for a specific image field

Contents

  • Function Definition
  • Parameters
  • Returns

Function Definition

function pods_image_id_from_field ( $image )

Source File: /pods/includes/media.php, since 2.0.5

Parameters

PARAMETER TYPE DETAILS
$image (array|int|string) The image field array, ID, or guid

Returns

(int) Attachment ID

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)

 Documentation Information

Created: December 14, 2018
Last Updated: December 14, 2018
Age: 804 days ago
Context: Code Reference Images & Files 
Skill Level: Developer 
Keywords: media 
Authors: Jim True

Related Content

  •   Related Docs
    • Media Functions

Was this helpful?

  • Get Support!

  • We're sorry to hear you still have questions. Please check out our Support Website for proper escalation for getting support help.

    Get Support

  • Update Documentation

  • Please be as specific as possible. If you found errors, let us know what we can do to correct them. If you feel the documentation could be clearer, please tell us what to do to make it as clear as possible. Your input will help us keep our documentation up to date!
  • We won't spam you or share your email address with anyone else, but we need this in case we have any additional questions.
  • This field is for validation purposes and should be left unchanged.

We make it easy to manage your custom content types, enhance them with custom fields and taxonomy, connect them together with relationship fields and so much more.

Grow Beyond Posts & Pages with Pods, a Content Development Framework for WordPress.

The Pods Team

  • SKC Development, LLC, Project Lead DeveloperSKC Development, LLC from SKC Development, LLC
    Project Lead Developer
  • Jory Hogeveen, Contributing DeveloperJory Hogeveen from Keraweb
    Contributing Developer
  • Jim True, Community Support LeadJim True from Rocketgenius, Inc.
    Community Support Lead
  • Bernhard Gronau, Contributing Developer & Community SupportBernhard Gronau
    Contributing Developer & Community Support
  • Nic Ford, Community SupportNic Ford
    Community Support
  • James Golovich, Contributing DeveloperJames Golovich
    Contributing Developer

Learn about the Team at Pods

RSS Recent Blog Posts

  • Pods 2.8 Beta 1 Released and the Field Guide to Pods 2.8 February 11, 2021
  • Introducing: Pods Pro by SKCDEV, Pods 2.8 in QA, & New YouTube Videos January 1, 2021

Special Thanks

We could not have survived for 10 years without all of the help from the following people.

  • Phil Lewis, Contributing DeveloperPhil Lewis
    Contributing Developer
  • Josh Pollock, Contributing DeveloperJosh Pollock from CalderaWP
    Contributing Developer
  • Nikhil Vimal, Intern DeveloperNikhil Vimal
    Intern Developer
  • David Cramer, Contributing DeveloperDavid Cramer
    Contributing Developer
  • Dan Stefan Oprean, Contributing DeveloperDan Stefan Oprean
    Contributing Developer
  • Mike Green, Contributing DeveloperMike Green from Fifth Room Creative
    Contributing Developer
  • Jonathan Christopher, Contributing DeveloperJonathan Christopher from Iron to Iron
    Contributing Developer
  • Matt Gibbs, Founding Developer: Pods 1.xMatt Gibbs
    Founding Developer: Pods 1.x

Most Popular Docs

  • Pods Shortcode
  • Magic Tags
  • What kind of a Pods User are you?
  • Pods Templates
  • Using Magic Tags

Hosting Generously Provided by WPEngine

Powered by
© 2008-2021 Pods Framework, Inc. All rights reserved.