Strip Image Metadata (#2313)

pull/1/head
Daniel Gasienica 7 years ago committed by GitHub
commit 3d147a3e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -47,6 +47,8 @@ exports.isValid = rawAttachment => {
}; };
// Upgrade steps // Upgrade steps
// NOTE: This step strips all EXIF metadata from JPEG images as
// part of re-encoding the image:
exports.autoOrientJPEG = async attachment => { exports.autoOrientJPEG = async attachment => {
if (!MIME.isJPEG(attachment.contentType)) { if (!MIME.isJPEG(attachment.contentType)) {
return attachment; return attachment;

@ -16,6 +16,8 @@ const PRIVATE = 'private';
// - Schema initialized // - Schema initialized
// Version 1 // Version 1
// - Attachments: Auto-orient JPEG attachments using EXIF `Orientation` data. // - Attachments: Auto-orient JPEG attachments using EXIF `Orientation` data.
// N.B. The process of auto-orient for JPEGs strips (loses) all existing
// EXIF metadata improving privacy, e.g. geolocation, camera make, etc.
// Version 2 // Version 2
// - Attachments: Sanitize Unicode order override characters. // - Attachments: Sanitize Unicode order override characters.
// Version 3 // Version 3

Loading…
Cancel
Save