Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Upload jpeg #3513

Merged
merged 2 commits into from
Sep 19, 2017
Merged

Upload jpeg #3513

merged 2 commits into from
Sep 19, 2017

Conversation

ianb
Copy link
Contributor

@ianb ianb commented Sep 19, 2017

  • Allows JPEGs on the server, both to pass content checks, and to make use of stored content
    -types (instead of assuming image/png).
  • Puts an clip.image.type into shot objects
  • Uses .jpg for filenames when appropriate
  • Adds a new buildSetting for controlling the cutoff when we use JPEG
  • If a PNG image is too large, tries to make a JPEG and substitutes if the JPEG is actually smaller
  • Refactor some data:-URL and blob conversion functions into their own module

- Allows JPEGs on the server, both to pass content checks, and to make use of stored content-types (instead of assuming image/png).
- Puts an clip.image.type into shot objects
- Uses .jpg for filenames when appropriate
- Adds a new buildSetting for controlling the cutoff when we use JPEG
- If a PNG image is too large, tries to make a JPEG and substitutes if the JPEG is actually smaller
- Refactor some data:-URL and blob converstion functions into their own module
Copy link
Member

@jaredhirsch jaredhirsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this applied, I'm seeing a Giphy fullpage shot go from ~3 MB to ~900 KB, and Imgur after scrolling go from ~10MB to ~1MB. Nicely done! 💯

@jaredhirsch
Copy link
Member

@ianb looks like a couple minor issues with the linter. I'll file a followup to fix em

@jaredhirsch jaredhirsch merged commit 82139ed into master Sep 19, 2017
@jaredhirsch jaredhirsch deleted the upload-jpeg branch September 19, 2017 23:40
ianb added a commit that referenced this pull request Sep 22, 2017
The clip object is used to inform the download filename, so we need to add a clip before generating the filename
jaredhirsch pushed a commit that referenced this pull request Sep 22, 2017
The clip object is used to inform the download filename, so we need to add a clip before generating the filename
ianb added a commit that referenced this pull request Sep 25, 2017
* Start #220, allow JPEG uploads, and respect content-type for JPEG or PNG

* Fix #220, use JPEG for large shots

- Allows JPEGs on the server, both to pass content checks, and to make use of stored content-types (instead of assuming image/png).
- Puts an clip.image.type into shot objects
- Uses .jpg for filenames when appropriate
- Adds a new buildSetting for controlling the cutoff when we use JPEG
- If a PNG image is too large, tries to make a JPEG and substitutes if the JPEG is actually smaller
- Refactor some data:-URL and blob converstion functions into their own module
ianb added a commit that referenced this pull request Sep 25, 2017
The clip object is used to inform the download filename, so we need to add a clip before generating the filename
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants