Breadcrumb
- Home
- Documentation
- Media
Media
Main navigation
Several types of media are allowed including images, documents, audio files and content from external sources like YouTube, Vimeo, Twitter, Facebook and the University of Iowa's UI Capture (Panopto) service.
With all of these media types, you can add them from other content through fields and the WYSIWYG for display.
Each of the media types have specific documentation, but there are some shared functionality to highlight.
You can either add them directly to your site by going to Content > Media (/admin/content/media), or as you create content through fields and WYSIWYG text editors.
Replace File
When editing media from the Media overview page (admin/content/media), you have the option to overwrite the existing file. This is the default behavior and is indicated by the checked "Overwrite original file" checkbox. This will overwrite the existing file and use the same directory and filename (e.g. ../2020-09/filename.pdf). This can be useful if you have sent out hard-coded links in emails or other communications.
If you uncheck "Overwrite original file", the media object will point to a new file with a different name. The old file, if not used elsewhere, will be deleted eventually.
Regardless of whether "Overwrite original file" is checked or not, updating a file will update any content where the media has been placed/referenced as long as it is not a hard-coded link, e.g. https://mysite.uiowa.edu/sites/mysite.uiowa.edu/files/2020-09/myfile.pdf. File fields and the WYSIWYG media button use special markup to reference media objects that is converted dynamically so you don't have to worry about updating links to files.
Deleting Media
You can delete media files through the Media overview page (admin/content/media), but there are a couple things to keep in mind.
- A warning message should be displayed with a link to the Usages tab where you can find and clean up references to the media item. This warning can include placement in WYSIWYG editors, placement in blocks or content type fields, but is not considered to be 100% accurate.
- Once you are able to delete the media file, it is first only deleted through the UI. Editors won't be able to reference/place the media file anymore on the website.
- The actual file on the server will still exist for about six hours until the garbage collection process runs. If the file was recently fetched, the file may still be cached on the server and for browsers that previously viewed the file.
- There are certain situations where caches don't properly clear or the file on the server is not properly released to be deleted. We can trigger site-wide cache clearing to free this up and/or investigate why the file was not released. Please contact us if you suspect that either of these are the case.
Caching
When replacing certain media types like images and audio, the changes may not be immediately apparent. This is because browsers display a cached copy, if previously downloaded, for a period of time. People visiting your site for the first time should see the new media immediately. However, to force browsers to download the new image if previously cached, you can uncheck "Overwrite original file" when editing media.