Comments (4)
If you're generating multiple output images (dimensions and formats) from a single input and a local filesystem is available then my advice to use it, at least for the input, remains. This will both lower fragmentation and increase throughput.
from sharp.
tell sharp to just be a "PassThrough" if it can't support a file
sharp will always perform a decode/encode roundtrip.
The scenario you describe, where you need alternative logic depending on the contents of a Stream, suggests you'll either need to create your own Transform Stream or perhaps remove Streams entirely with something like https://github.com/stream-utils/raw-body
If this is for Strapi, please see strapi/strapi#16978 (comment)
from sharp.
Yes it's for strapi and I'm actually reworking the internals to read the stream directly from the request instead of having a file on disk.
Are you recommending not using streams as a general comment ? is it because in anycase you endup loading enverything into memory or sth like that ?
It might be valuable to know (or document) what operations (metadata,stats,resize,...) actually are buffering everything into memory and which actually benefit from streams 🤔
from sharp.
Going to close this as your answer is enough to know I will need to manage on our side anyway ;)
from sharp.
Related Issues (20)
- Support metadata for parsing gifs HOT 4
- vips jpegsave logs a warning while sharp handles it as error HOT 2
- Nuxt build failed on Cloudflare Pages. Cannot resolve "@img/sharp-wasm32/versions". HOT 2
- create gif using multiple images HOT 1
- Image metadata won't update HOT 5
- Cannot run a packaged electron forge app HOT 6
- WebP image size is increased when processed through sharp HOT 3
- How to bundle sharp for AWS Lambda using esbuild CLI HOT 9
- Error: Could not load the "sharp" module using the win32-x64 runtime in a Windows System HOT 1
- Support for streaming RAW images HOT 2
- runtime error : TypeError: require(...).availableParallelism is not a function with node version < v19.4.0 HOT 1
- Could not load the "sharp" module using the darwin-arm64 runtime HOT 5
- Trimming artifacts on the right side of small images HOT 2
- Windows: Experiencing silent crash when attempting to convert a JPEG to a GIF HOT 15
- Custom libvips loads and saves HEIC, pdf, etc. but Sharp not HOT 2
- Extend to a specified width and height in single operation without knowing the prior width or height HOT 2
- ICC profiles in PNG images generated by Figma have truncated iCCP chunks HOT 9
- Sharp/Vips crashed in almost all latest Linux HOT 1
- Remove "engines" fields from all package.json files for improved backwards compatibility with unmaintained package managers HOT 4
- Install on Heroku: cannot find glib-object.h HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharp.