Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
immutable-app-image
Advanced tools
Immutable App Image is an immutable-app module that provides image upload, editing and storage functionality.
Immutable App Image uses Cropper.js to crop images on the client side prior to uploading and sharp to process images on the backend.
Images are stored via an mz/fs compatible file system which can be the local file system or a remote virtual file system such as gcsfs.
Property name | Description |
---|---|
fileName | string param case file name will have id and type appended |
fileType | string encoding type (jpg |
imageName | string user provided name for description |
imageTypeId | id for Image Type |
meta | object user provided meta data for image |
path | string location of image in file system |
The Image model stores basic information about the original image uploaded by the user.
The fileName
of the image is constructed from the param-case name, the Image id
and the fileType.
For example: if the user provided name is "My Vacation" the fileName might be: "my-vacation-8449328a1eedfd27b1214d7d4fb16315.jpg".
The path
of the image is relative to the base of the file system and does not
include the fileName
.
The meta
data for an image can include anything. In the meta
data lat
and
'lng' should be used as the properties for geo location, title
should be used
for a single line description of the image, description
should be used for a
longer multi-line description of the image, and createTime
should be used to
store the datetime when the image was originally taken.
Property name | Description |
---|---|
cropClient | string crop image on client (always |
fileType | string encoding type (jpg |
height | integer image height |
imageTypeName | string image type name |
maxClientHeight | integer maximum image height to upload from client |
maxClientWidth | integer maximum image width to upload from client |
maxHeight | integer maximum image height |
maxWidth | integer maximum image width |
quality | integer 0-100 quality for jpg and webp image encoding |
width | integer image width |
Image Types are used for categorizing images and defined how images are uploaded and stored.
The clientCrop
parameter determines whether or not cropping and encoding will
be done by the client.
By default clientCrop
is set to best
which means that the image will only be
cropped by the client if it exceeds the maxClientHeight
or maxClientWidth
values.
Cropping on the client will reduce upload times for large images but that may come at the price of reduced image quality.
The fileType
determines how the file will be stored on the server.
If maxHeight
and/or maxWidth
properties are set they will limit the size of
the image but aspect ratio will be maintained and the image will not be upscaled
if it is less than the maxHeight/maxWidth.
If height
and/or width
are set the image will the scaled to exactly these
values. Image may be upscaled and aspect ratio may not be maintained.
Property name | Description |
---|---|
fileType | string encoding type (jpg |
height | integer image height |
imageProfileName | string image profile name |
maxHeight | integer maximum image height |
maxWidth | integer maximum image width |
pregenerate | boolean generate images for for profile in advance |
quality | integer 0-100 quality for jpg and webp image encoding |
width | integer image width |
Image Profiles define different versions of an image that will be made available for download.
One or more Image Profiles can be linked to an Image Type.
The name
for a profile must be in param case: i.e. lower case, dashes, and no
spaces.
If the preGenerate
property is set then when an image is uploaded a version
of for the Image Profile will be created.
Pre-generated images are stored with the profile name afer the id and before the fileType like: "my-vacation-8449328a1eedfd27b1214d7d4fb16315-thumbnail.jpg".
Property name | Description |
---|---|
name | string album name |
description | string album description |
imageTypeId | id for Image Type |
Albums allow users to categorize images.
Albums can only contain images of the same Image Type.
Presentation of Images to users is based on a 3-level structure where the first level is Image Type, the 2nd level is images that have not been assigned to an album, and the 3rd level is images for a particular album.
FAQs
Immutable app image module
The npm package immutable-app-image receives a total of 1 weekly downloads. As such, immutable-app-image popularity was classified as not popular.
We found that immutable-app-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.