General guidelines for using attachments in offline mode
When working with attachments in offline mode, keep these general guidelines in mind for usability and a good user experience.
Note: Many of the issues discussed can be resolved using system properties. For more information, see System properties in offline mode.
Controlling offline attachment file types
Define which file types can be downloaded offline using the
glide.sg.offline.attachment.allowed_content_typessystem property, for example,image/pngorimage/jpg. This property prevents irrelevant or unsafe files from being downloaded, keeping offline storage lean.Limiting attachment file size for offline use
Use the
glide.sg.offline.attachment.max_sizesystem property to set the maximum size in bytes for a single attachment downloaded offline. Files exceeding this limit aren't downloaded and display as a placeholder, preventing large attachments, such as long videos, from causing performance issues or filling device storage.Total attachment storage limit
Use the
glide.sg.offline.attachment.max_total_bytessystem property to cap the total storage space allocated for offline attachments. The default is 50 MB with a maximum of 2 GB, ensuring attachments don't fill up a user's device storage.Image attachment handling in offline mode
Image handling when taking pictures in the activity stream differs by platform:
- Android: Images are automatically compressed to approximately 75% quality and converted to JPEG format, regardless of the original file type.
- iOS: Images are uploaded as is, with no compression or format conversion applied.
Parent Topic:Attachment behavior in offline mode