Tools::ImageHelper
Inherits Tools::FileHelper
Constants
ALLOWED_IMAGE_CONTENT_TYPES = ["image/png", "image/jpeg"]
Allowed image content types
ALLOWED_IMAGE_FORMATS = ["PNG", "JPEG"]
Allowed image formats
ALLOWED_IMAGE_MAGIC_B64 = ["iVBORw0KGgo", "/9j/"]
Base64-encoded magic bytes for allowed image formats, without padding so we can do prefix checking.
MAX_IMAGE_FILE_SIZE = (2 * 1024) * 1024
UNKNOWN_IMAGE_TYPE = "unknown"
Instance methods
Determines the content type based on the magic bytes of the image