Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author htmlBurger

    (@htmlburger)

    Howdy @knath632,

    Image and file fields save the ID of the attachment by default. In the backend they display the URL of the file just for presentation purposes, for convenience, but still, the ID is stored.

    The ID is better for storage, as it allows to fetch a lot of other information for the attachment, including the URL of the file.

    In case you want to store the URL, you can use the ->set_value_type( 'url' ) method, as documented here: https://carbonfields.net/docs/fields-image/

    Plugin Contributor Marin Atanasov

    (@tyxla)

    Howdy @knath632,

    Image and file fields store the ID of the attachment by default. In the backend they display the URL of the file just for presentation purposes, for convenience. But still, the ID is stored for these field types.

    The ID is better for storage of attachments, as it allows to fetch a lot of other information for the attachment, including the URL of the file.

    In case you want to store the URL, you can use the ->set_value_type( 'url' ) method, as documented in the Fields -> Image article in our documentation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘why carbon filed fetching image by url and after changing the server in the same’ is closed to new replies.