Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow redirects for images #99

Closed
aileen opened this issue Sep 8, 2017 · 0 comments · Fixed by #101
Closed

Follow redirects for images #99

aileen opened this issue Sep 8, 2017 · 0 comments · Fixed by #101

Comments

@aileen
Copy link
Collaborator

aileen commented Sep 8, 2017

Currently we're using https or http to make requests to read the image buffer and then pass it to image-size. These don't follow redirects. The library got follows redirects and would simplify the request a lot.

With TryGhost/Ghost#8892 we switched to the got library for the very same task and are very happy with it. I suggest doing the same here.

aileen added a commit to aileen/amperize that referenced this issue Sep 13, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
aileen added a commit to aileen/amperize that referenced this issue Sep 13, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
aileen added a commit to aileen/amperize that referenced this issue Sep 13, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
- indents
aileen added a commit to aileen/amperize that referenced this issue Sep 13, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
- indents
- Added dependencies:
    - [validator](https://github.com/chriso/validator.js)
    - [lodash](https://github.com/lodash/lodash)
    - [got](https://github.com/sindresorhus/got)
aileen added a commit to aileen/amperize that referenced this issue Sep 13, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
- indents
- Added dependencies:
    - [validator](https://github.com/chriso/validator.js)
    - [lodash](https://github.com/lodash/lodash)
    - [got](https://github.com/sindresorhus/got)
aileen added a commit to aileen/amperize that referenced this issue Oct 3, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
- indents
- Added dependencies:
    - [validator](https://github.com/chriso/validator.js)
    - [lodash](https://github.com/lodash/lodash)
    - [got](https://github.com/sindresorhus/got)
aileen added a commit to aileen/amperize that referenced this issue Oct 3, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
- indents
- Added dependencies:
    - [validator](https://github.com/chriso/validator.js)
    - [lodash](https://github.com/lodash/lodash)
    - [got](https://github.com/sindresorhus/got)
aileen added a commit to aileen/amperize that referenced this issue Oct 3, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
- indents
- dercreased timeout to 3s instead of 5s
- Added dependencies:
    - [validator](https://github.com/chriso/validator.js)
    - [lodash](https://github.com/lodash/lodash)
    - [got](https://github.com/sindresorhus/got)
aileen added a commit to aileen/amperize that referenced this issue Oct 3, 2017
closes jbhannah#99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
- indents
- dercreased timeout to 3s instead of 5s
- Added dependencies:
    - [validator](https://github.com/chriso/validator.js)
    - [lodash](https://github.com/lodash/lodash)
    - [got](https://github.com/sindresorhus/got)
kirrg001 pushed a commit that referenced this issue Oct 3, 2017
closes #99

- Used [`got`](https://github.com/sindresorhus/got) for image-size requests, which is more lightweight and has the huge advantage of following redirects
- Added and updated test
- indents
- decreased timeout to 3s instead of 5s
- Added dependencies:
    - [validator](https://github.com/chriso/validator.js)
    - [lodash](https://github.com/lodash/lodash)
    - [got](https://github.com/sindresorhus/got)
- Removed unused error conditionals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant