single image field abilty to save image url to database

Support General single image field abilty to save image url to database

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8307
    brkardbrkard
    Participant

    Hi.

    All image fields seems saves atacchemnt ids to database. Only file_input field saves url to database..

    I need to save some of single_image fields value save database as image url.

    Can i do this with some filter or hooks or with some custom snippet ?

    Thanks.

    #8327
    Anh TranAnh Tran
    Keymaster

    Why do you want this? Using ID allows us to get other info of the image easily. Besides, you still can get the URL of the images.

    #8330
    brkardbrkard
    Participant

    Hi.

    I control some themes or plugins options with your metabox plugin. And i am happy with that:)

    Every plugin or theme can have some their own metaboxes. So i am removing them and using your plugin the control these .

    Sometimes these plugins or themes are saving meta values with different ways.

    For example one of themes page title image background meta value option is saving value to database with image url. Not atachment id. So i cant control this with your single_image field.

    For that reason i have asked this.

    Thanks.

    #8347
    Anh TranAnh Tran
    Keymaster

    Gotcha! In this case, I think file_input works best. You still can use the media library to upload/select images while still seeing the image URLs. If you have multiple images, probably need to make the field cloneable.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘single image field abilty to save image url to database’ is closed to new replies.