Guide: Files, Images, And Media

Drupal has several ways to handle images.

An image field references an image file. Media is more complex and can be reused across content.

Embedded Images

Images can be embedded in CKEditor.

Media can be embedded, add the Media Library button to CKEditor.

Files

Files can be attached to content and stored in a directory on the server.

View uploaded files: Content > Files.

File System Settings

Configuration > Media > File system

Most settings are configured in settings.php and are read only here.

Image Field

The Article content type has an image field by default. You can display this above or below the body in Manage Display.

Images uploaded to an image field can be found in Content > Files.

Editor Plugin

You can add images within your content with the CKEditor plugin.

Change image editor button settings here.

Captions

The editor lets you add a caption to both images and media.

Image Styles

We usually need to optimize images for use on the web to reduce the file size and fit the screen. Image styles define dimensions and how displayed images are created from the source.

Go to Configuration > Media > Image styles.

Media

Media is a fieldable entity, which means you can have media types with specific fields you need.

Media Library

The Media Library is at Content > Media > Media library.

Standalone Media URL

Enable a page to view the media at /media/ID.

Upload

Bulk Import

Cropping

Replace Files

Delete Files

Orphaned Files

https://www.drupal.org/project/orphaned_files

File Management

Issues

https://www.drupal.org/project/drupal/issues/2821423

 

Tags
Files Media