title: Joomla 3.x - Field type media point to media directory instead of images directory
body: <p>I am developing a custom component for Joomla 3.x. In mysite/administrator/components/com_mycomponent/models/forms/page.xml I am using a field type of media as follows:</p>
  
  <pre><code>&lt;field 
  name="thumbnail"
  type="media"
  directory=""
  hide_none="1"
  label="COM_MYCOMPONENT_FIELD_THUMBNAIL_LABEL"
  description="COM_MYCOMPONENT_FIELD_THUMBNAIL_DESC"/&gt;
  </code></pre>
  
  <p>As we know directory attribute of this type of field should be relative to the top level /images/ folder (mysite/images/). Ref: <a href="http://docs.joomla.org/Media_form_field_type" rel="nofollow noreferrer">this link</a>.</p>
  
  <p>How can I make this directory point to mysite/media/my_component/ folder? I have already tested:</p>
  
  <pre><code>directory="../media/my_component"
  </code></pre>
  
  <p>It doesn't work.</p>
  
  <p>One way to make it work GLOBALLY would be to go to the global configuration settings in your admin area, click on "Media Manager" and change "Path to image folder" and/or "Path to files folder" from "images" to "media" (for my case). This will change the path globally, I mean whenever you use media field type, the default directory will be "media" instead of "images". I'm still looking for a way to modify it non-globally. I think I should make a custom field using media.php field. Please let me know if you have any idea achieving this goal.</p>
  
  <p><img src="https://i.stack.imgur.com/eaQDD.jpg" alt="Media Manager in Global Configuration"></p>