Title: &quot;image-select&quot; &#8211; local links
Last modified: August 30, 2016

---

# "image-select" – local links

 *  [seweral](https://wordpress.org/support/users/seweral/)
 * (@seweral)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/image-select-local-links/)
 * Thank you for your help so far 🙂
    I work with fields “image-select”. He wants
   to associate them with a specific theme. I have this code:
 *     ```
       array (
       'id' => 'layout',
       'name' => __ ('Icons', 'my-theme'),
       'type' => 'image_select'
       // Array of 'value' => 'Image Source' pairs
       'options' => array (
       '/img/icon-1.png' => '/img/icon-1.png'
       '/img/icon-2.png' => '/img/icon-2.png'
       '/img/icon-3.png' => '/img/icon-3.png'
       '/img/icon-4.png' => '/img/icon-4.png'
       )
       )
       )
       ```
   
 * I wish that the images were uploaded from local links. So I changed the file 
   image-select.php adding get_stylesheet_directory_uri () line:
 *     ```
       $tpl  = '<label class="rwmb-image-select"><img src="'. get_stylesheet_directory_uri() . '%s"><input type="%s" class="hidden" name="%s" value="%s"%s></label>';
       ```
   
 * and I put in the files of the page/post:
 *     ```
       <?php $my_metabox_1 = rwmb_meta('checkbox_1'); ?>
       <?php if ($my_metabox_1) echo '<img src="'.get_template_directory_uri() .''.rwmb_meta('layout').'">' ;?>
       ```
   
 * And everything works very well. 🙂
    But … when I update the plugin is my change
   in image-select.php file will be overwritten. Do you know any way that allowed
   to avoid overwriting this correction?
 * Thank you for your help.
    Jack
 * [https://wordpress.org/plugins/meta-box/](https://wordpress.org/plugins/meta-box/)

The topic ‘"image-select" – local links’ is closed to new replies.

 * ![](https://ps.w.org/meta-box/assets/icon-128x128.png?rev=1100915)
 * [Meta Box](https://wordpress.org/plugins/meta-box/)
 * [Support Threads](https://wordpress.org/support/plugin/meta-box/)
 * [Active Topics](https://wordpress.org/support/plugin/meta-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meta-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meta-box/reviews/)

## Tags

 * [image-select](https://wordpress.org/support/topic-tag/image-select/)

 * 0 replies
 * 1 participant
 * Last reply from: [seweral](https://wordpress.org/support/users/seweral/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/image-select-local-links/)
 * Status: not resolved