0.8.0 • Published 5 years ago

immutable-app-image v0.8.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

immutable-app-image

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.

Immutable App Image uses Immutable Core Service to persist image type and image profile data globally. This data is used whenever images are displayed or uploaded. By default this data will be refreshed every 60 seconds so changes to image types and image profiles will not be reflected by application clients for up to 60 seconds.

Immutable App Image v0.3 and Immutable Core Model v3

Immutable App Image v0.3 is required to support the breaking changes that were made in Immutable Core Model v3.

Immutable App Image v0.3 is not compatible with Imutable Core Model v2.

Image Schema

Image

Property nameDescription
fileNamestring param case file name will have id and type appended
fileTypestring encoding type (jpgpngwebp)
imageNamestring user provided name for description
imageTypeIdid for Image Type
metaobject user provided meta data for image
pathstring 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.

Image Type

Property nameDescription
cropClientstring crop image on client (alwaysbestnever)
fileTypestring encoding type (jpgpngwebp)
heightinteger image height
imageTypeNamestring image type name
maxClientHeightinteger maximum image height to upload from client
maxClientWidthinteger maximum image width to upload from client
maxHeightinteger maximum image height
maxWidthinteger maximum image width
qualityinteger 0-100 quality for jpg and webp image encoding
widthinteger 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.

Image Profile

Property nameDescription
fileTypestring encoding type (jpgpngwebp)
heightinteger image height
imageProfileNamestring image profile name
maxHeightinteger maximum image height
maxWidthinteger maximum image width
pregenerateboolean generate images for for profile in advance
qualityinteger 0-100 quality for jpg and webp image encoding
widthinteger 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".

To support webp multiple profiles with the same name should be created. One of these profiles should be either jpg or png and the either should be webp.

0.8.0

5 years ago

0.7.139

6 years ago

0.7.138

6 years ago

0.7.137

6 years ago

0.7.136

6 years ago

0.7.135

6 years ago

0.7.134

6 years ago

0.7.133

6 years ago

0.7.132

6 years ago

0.7.131

6 years ago

0.7.130

6 years ago

0.7.129

6 years ago

0.7.128

6 years ago

0.7.127

6 years ago

0.7.126

6 years ago

0.7.125

6 years ago

0.7.124

6 years ago

0.7.123

6 years ago

0.7.122

6 years ago

0.7.121

6 years ago

0.7.120

6 years ago

0.7.119

6 years ago

0.7.118

6 years ago

0.7.117

6 years ago

0.7.116

6 years ago

0.7.115

6 years ago

0.7.114

6 years ago

0.7.113

6 years ago

0.7.112

6 years ago

0.7.111

6 years ago

0.7.110

6 years ago

0.7.109

6 years ago

0.7.108

6 years ago

0.7.107

6 years ago

0.7.106

6 years ago

0.7.105

6 years ago

0.7.104

6 years ago

0.7.103

6 years ago

0.7.102

6 years ago

0.7.101

6 years ago

0.7.100

6 years ago

0.7.99

6 years ago

0.7.98

6 years ago

0.7.97

6 years ago

0.7.96

6 years ago

0.7.95

6 years ago

0.7.94

6 years ago

0.7.93

6 years ago

0.7.92

6 years ago

0.7.91

6 years ago

0.7.90

6 years ago

0.7.89

6 years ago

0.7.88

6 years ago

0.7.87

6 years ago

0.7.86

6 years ago

0.7.85

6 years ago

0.7.84

7 years ago

0.7.83

7 years ago

0.7.82

7 years ago

0.7.81

7 years ago

0.7.80

7 years ago

0.7.79

7 years ago

0.7.78

7 years ago

0.7.77

7 years ago

0.7.76

7 years ago

0.7.75

7 years ago

0.7.74

7 years ago

0.7.73

7 years ago

0.7.72

7 years ago

0.7.71

7 years ago

0.7.70

7 years ago

0.7.69

7 years ago

0.7.68

7 years ago

0.7.67

7 years ago

0.7.66

7 years ago

0.7.65

7 years ago

0.7.64

7 years ago

0.7.63

7 years ago

0.7.62

7 years ago

0.7.61

7 years ago

0.7.60

7 years ago

0.7.59

7 years ago

0.7.58

7 years ago

0.7.57

7 years ago

0.7.56

7 years ago

0.7.55

7 years ago

0.7.54

7 years ago

0.7.53

7 years ago

0.7.52

7 years ago

0.7.51

7 years ago

0.7.50

7 years ago

0.7.49

7 years ago

0.7.48

7 years ago

0.7.47

7 years ago

0.7.46

7 years ago

0.7.45

7 years ago

0.7.44

7 years ago

0.7.43

7 years ago

0.7.42

7 years ago

0.7.41

7 years ago

0.7.40

7 years ago

0.7.39

7 years ago

0.7.38

7 years ago

0.7.37

7 years ago

0.7.36

7 years ago

0.7.35

7 years ago

0.7.34

7 years ago

0.7.33

7 years ago

0.7.32

7 years ago

0.7.31

7 years ago

0.7.30

7 years ago

0.7.29

7 years ago

0.7.28

7 years ago

0.7.27

7 years ago

0.7.26

7 years ago

0.7.25

7 years ago

0.7.24

7 years ago

0.7.23

7 years ago

0.7.22

7 years ago

0.7.21

7 years ago

0.7.20

7 years ago

0.7.19

7 years ago

0.7.18

7 years ago

0.7.17

7 years ago

0.7.16

7 years ago

0.7.15

7 years ago

0.7.14

7 years ago

0.7.13

7 years ago

0.7.12

7 years ago

0.7.11

7 years ago

0.7.10

7 years ago

0.7.9

7 years ago

0.7.8

7 years ago

0.7.7

7 years ago

0.7.6

7 years ago

0.7.5

7 years ago

0.7.4

7 years ago

0.7.3

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.4

7 years ago

0.6.3

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.90

7 years ago

0.4.89

7 years ago

0.4.88

7 years ago

0.4.87

7 years ago

0.4.86

7 years ago

0.4.85

7 years ago

0.4.84

7 years ago

0.4.83

7 years ago

0.4.82

7 years ago

0.4.81

7 years ago

0.4.80

7 years ago

0.4.79

7 years ago

0.4.78

7 years ago

0.4.77

7 years ago

0.4.76

7 years ago

0.4.75

7 years ago

0.4.74

7 years ago

0.4.73

7 years ago

0.4.72

7 years ago

0.4.71

7 years ago

0.4.70

7 years ago

0.4.69

7 years ago

0.4.68

7 years ago

0.4.67

7 years ago

0.4.66

7 years ago

0.4.65

7 years ago

0.4.64

7 years ago

0.4.63

7 years ago

0.4.62

7 years ago

0.4.61

7 years ago

0.4.60

7 years ago

0.4.59

7 years ago

0.4.58

7 years ago

0.4.57

7 years ago

0.4.56

7 years ago

0.4.55

7 years ago

0.4.54

7 years ago

0.4.53

7 years ago

0.4.52

7 years ago

0.4.51

7 years ago

0.4.50

7 years ago

0.4.49

7 years ago

0.4.48

7 years ago

0.4.47

7 years ago

0.4.46

7 years ago

0.4.45

7 years ago

0.4.44

7 years ago

0.4.43

7 years ago

0.4.42

7 years ago

0.4.41

7 years ago

0.4.40

7 years ago

0.4.39

7 years ago

0.4.38

7 years ago

0.4.37

7 years ago

0.4.36

7 years ago

0.4.35

7 years ago

0.4.34

7 years ago

0.4.33

7 years ago

0.4.32

7 years ago

0.4.31

7 years ago

0.4.30

7 years ago

0.4.29

7 years ago

0.4.28

7 years ago

0.4.27

7 years ago

0.4.26

7 years ago

0.4.25

7 years ago

0.4.24

7 years ago

0.4.23

7 years ago

0.4.22

7 years ago

0.4.21

7 years ago

0.4.20

7 years ago

0.4.19

7 years ago

0.4.18

7 years ago

0.4.17

7 years ago

0.4.16

7 years ago

0.4.15

7 years ago

0.4.14

7 years ago

0.4.13

7 years ago

0.4.12

7 years ago

0.4.11

7 years ago

0.4.10

7 years ago

0.4.9

7 years ago

0.4.8

7 years ago

0.4.7

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.62

7 years ago

0.3.61

7 years ago

0.3.60

7 years ago

0.3.59

7 years ago

0.3.58

7 years ago

0.3.57

7 years ago

0.3.56

7 years ago

0.3.55

7 years ago

0.3.54

7 years ago

0.3.53

7 years ago

0.3.52

7 years ago

0.3.51

7 years ago

0.3.50

7 years ago

0.3.49

7 years ago

0.3.48

7 years ago

0.3.47

7 years ago

0.3.46

7 years ago

0.3.45

7 years ago

0.3.44

7 years ago

0.3.43

7 years ago

0.3.42

7 years ago

0.3.41

7 years ago

0.3.40

7 years ago

0.3.39

7 years ago

0.3.38

7 years ago

0.3.37

7 years ago

0.3.36

7 years ago

0.3.35

7 years ago

0.3.34

7 years ago

0.3.33

7 years ago

0.3.32

7 years ago

0.3.31

7 years ago

0.3.30

7 years ago

0.3.29

7 years ago

0.3.28

7 years ago

0.3.27

7 years ago

0.3.26

7 years ago

0.3.25

7 years ago

0.3.24

7 years ago

0.3.23

7 years ago

0.3.22

7 years ago

0.3.21

7 years ago

0.3.20

7 years ago

0.3.19

7 years ago

0.3.18

7 years ago

0.3.17

7 years ago

0.3.16

7 years ago

0.3.15

7 years ago

0.3.14

7 years ago

0.3.13

7 years ago

0.3.12

7 years ago

0.3.11

7 years ago

0.3.10

7 years ago

0.3.9

7 years ago

0.3.8

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.31

7 years ago

0.2.30

7 years ago

0.2.29

7 years ago

0.2.28

7 years ago

0.2.27

7 years ago

0.2.26

7 years ago

0.2.25

7 years ago

0.2.24

7 years ago

0.2.23

7 years ago

0.2.22

7 years ago

0.2.21

7 years ago

0.2.20

7 years ago

0.2.19

7 years ago

0.2.18

7 years ago

0.2.17

7 years ago

0.2.16

7 years ago

0.2.15

7 years ago

0.2.14

7 years ago

0.2.13

7 years ago

0.2.12

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.25

7 years ago

0.1.24

7 years ago

0.1.23

7 years ago

0.1.22

7 years ago

0.1.21

7 years ago

0.1.20

7 years ago

0.1.19

7 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.39

7 years ago

0.0.38

7 years ago

0.0.37

7 years ago

0.0.36

7 years ago

0.0.35

7 years ago

0.0.34

7 years ago

0.0.33

7 years ago

0.0.32

7 years ago

0.0.31

7 years ago

0.0.30

7 years ago

0.0.29

7 years ago

0.0.28

7 years ago

0.0.27

7 years ago

0.0.26

7 years ago

0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago