field config form
browser open button
browser popup

Less than Media, but good enough. This module adds an image browser (using Views) to a FileField Sources widget/field. It uses FileField Sources for submission and field settings.

  • Media adds a file/image browser. So does this module.
  • Media adds a lot of crazy options. This module doesn't.
  • Media is insanely hard to extend (partly because it's HUGE). This module isn't.
  • The FileField Sources "reference" field is impractical, because you don't know the image's filename, but you do know what it looks like. This module add visuals.

Set up / enable

  1. Download & install
  2. Create an image field (any (?) widget)
  3. Enable "Autocomplete reference textfield" under "File sources" (field instance settings)
  4. That's it. Go to the (node) form and select "Reference existing". There will be a new button "Choose file"

Extensibility

This module comes with a free, standard grid View. You can override that. If you're a fan of Features, you can clone it and disable the old one. The new one is then used (and featurizable!) because the path is still "admin/visual_select_file" and the tag is "visual_select_file".

API

Two hooks: hook_visual_select_file_formatter_options_alter() and hook_visual_select_file_results_alter(). See visual_select_file.module for context.

All JS is divided into small chunks (like Drupal.visualSelectFile.openGrid() and Drupal.visualSelectFile.openButtonLabel) to make changes simple.

CKEditor

1.3+ comes with a CKEditor button to add files to your WYSIWYG fields.

Upload

1.5+ comes with an upload form, to upload files directly into your WYSIWYG fields.

Manual Crop

1.6+ comes with Manual Crop support for VSF WYSIWYG.

Project Information

Downloads