Skip to content

DrRoach/ImageLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Library v0.3.2

Image Library is a plugin that can be added to your sites so that users can easily select images from a folder and submit them via a form.

Library Example:

Image Library example

Upload Example:

Image upload example

Example Code:

<form action="" method="post">
    <div id="il"></div>

    <input type="submit" name="submit" value="Submit">
</form>
<script>
    IL.create('#il');
</script>

Form Data:

"["image1.jpg",image5.jpg","bestImage.jpg"]"

setup.json

This is the file in which you can customize the plugin.

Examples:

ImageDirectory

The directory in which to get images from and where to save them.

ImageSize
width

Add a class to set the width of each image, best to use a bootstrap class.

height

Set the height of each image in pixels.

PreviewImageHeight

This is the height of the preview image that is shown when the user is selecting a image to upload. You may want this to be different to the library images' height as only one image is display on this page whereas many could be shown on the library. This is a pixel value e.g 200.

FileSize

The max file size of images that are being uploaded. This value is in bytes.

ImageBorderColour

The colour of the border to be added to images when they are selected in the library. The value is any valid CSS colour.

DeleteImageCrossColour

The colour of the delete image cross displayed in the top right of the image. The value is any valid CSS colour.

Current Version

In version 0.3.2 the user can select and deselect images and then submit them via a form. They can also upload new images from their machine. They can also delete any previously uploaded images.

Roadmap

Version 1.0

  • Select images
  • Upload images
  • Delete images
  • Basic image editing

About

A JavaScript image library that can be used to upload and delete images from an image library and also select images on a page.

Resources

Stars

Watchers

Forks

Packages

No packages published