Skip to content

Suggested v1.0 Roadmap #3

@coolaj86

Description

@coolaj86

Use Cases

I have two use cases for this:

  • Embedding images in an email template that are sent via web API
  • Resizing client-side before uploading to an imgur-like image API

As such this needs to fulfill two purposes:

  1. Demo - show how all of the useful features can be accomplished, at all
  2. Library
    • Make it easy to reuse the resizing functionality
    • Make it easy to bind to dom elements
      • Ex: file input (and paste), document body (drag and drop), url input

Roadmap

  • Promisify, for example
    function blobToDataURL(blob) {
        return new Promise(function (resolve, reject) {
            var a = new FileReader();
            a.onload = function (e) {
                resolve(e.target.result);
            };
            a.onerror = function (e) {
                reject(e);
            };
            a.readAsDataURL(blob);
        });
    }
  • Publish v0.5.0 to CDN (unpkg via npm, for example)
    • wrap in IIFE to make browser safe, for example:
      var RESIZER;
      (async function () {
          'use strict';
      
          // ...
      
          if ('undefined' === typeof module) {
              module.exports = RESIZER;
          }
      }());
    • add documentation for exported functions
  • Accept img src URL in addition to file #20
  • Accept paste from clipboard (reject non-images)
  • Form for Width, Heigh, Quality, (and Smoothing)
  • MVP.css https://github.com/andybrewer/mvp
  • Public v1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions