Body: <p>I need to develop a plugin where the user can modify his pictures (assets) on the fly. I've already done that in another PHP project and am willing to port it on craft, but I cant find any way on how to access assets, and what's the best way of doing it.</p>
  
  <ul>
  <li>First, I want my plugin to act on <strong>asset sources</strong>, like you enable it or not.</li>
  <li>Then, I want to add a button in the small window that opens up when you double click an asset (in an entry for example), how can one achieve this ?</li>
  </ul>
  
  <p>Thanks a lot !</p>
  
  <p><strong>Edit</strong>
  Usecase : I have an image gallery, where albums are a structure, and you can add images in any of them. New albums can be added by other users. When they double click a picture in the entry editor, I'd like to display a button that says something like "edit" (under the default options). I tried using a new field type but it's not the good and legit solution I guess.</p>
  
  <p>When the button is clicked, they are brought to a new page (still in CP) where they can edit their picture (I did the editor in javascript), then save it.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-25T20:38:12.727Z
Comments.Text: This question is very imprecise (and probably too broad, as well). Can you be more specific? What do you mean by "modify assets on the fly" and "act on asset sources"?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-25T22:30:46.360Z
Comments.Text: Possibly a duplicate of [this question...](https://craftcms.stackexchange.com/questions/454/how-do-we-create-a-pre-defined-asset-upload-field-in-a-plugin-that-integrates-wi/456#456) If you have something more specific to address, which isn't covered by that other thread, then please edit your question to hone in on a specific issue.
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-09-26T06:30:33.383Z
Comments.Text: hey thanks for your help ! I edited my question
Comments.UserDisplayName: ovesco
Tags: <plugin-development><assets><control-panel>
Title: Plugin access assets directly in CP
ThreadText: # Plugin access assets directly in CP
  
  (Asked by: username_0 on 2015-09-25)
  
  I need to develop a plugin where the user can modify his pictures (assets) on the fly. I've already done that in another PHP project and am willing to port it on craft, but I cant find any way on how to access assets, and what's the best way of doing it.
  
  * First, I want my plugin to act on **asset sources**, like you enable it or not.
  * Then, I want to add a button in the small window that opens up when you double click an asset (in an entry for example), how can one achieve this ?
  
  Thanks a lot !
  
  **Edit**
  Usecase : I have an image gallery, where albums are a structure, and you can add images in any of them. New albums can be added by other users. When they double click a picture in the entry editor, I'd like to display a button that says something like "edit" (under the default options). I tried using a new field type but it's not the good and legit solution I guess.
  
  When the button is clicked, they are brought to a new page (still in CP) where they can edit their picture (I did the editor in javascript), then save it.
  
  **Tags:** plugin-development, assets, control-panel
  
  > **Comments:**
  > **username_1**: This question is very imprecise (and probably too broad, as well). Can you be more specific? What do you mean by "modify assets on the fly" and "act on asset sources"?  
  > **username_2**: Possibly a duplicate of [this question...](https://craftcms.stackexchange.com/questions/454/how-do-we-create-a-pre-defined-asset-upload-field-in-a-plugin-that-integrates-wi/456#456) If you have something more specific to address, which isn't covered by that other thread, then please edit your question to hone in on a specific issue.  
  > **username_0**: hey thanks for your help ! I edited my question  
  
  ---
  
  ## 0 answers
  
  