Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@enhance/arc-image-plugin
Advanced tools
Drop large images in the static folder of an Architect app and request a transformed version.
You can install the plugin for any Architect app with npm install @enhance/arc-image-plugin
. You can then add it to your app manifest like this:
#app.arc
@app
image-app
@plugins
enhance/arc-image-plugin
The Architect framework serves static assets from a local folder that becomes an S3 bucket when deployed to AWS.
You drop your giant.jpeg
image in the public
folder, and then once deployed, you can access it from anywhere.
In your app you can request http://example.com/_static/giant.jpeg
or with a root relative path at /_public/giant.jpeg
.
With the image plugin, you can request the same image by swapping the “_static” for “transform” and include query parameters to get a different size (/transform/width_100,height_100/giant.jpeg
).
This will scale the image to fit in those dimensions while maintaining the aspect ratio.
Other examples:
The transformation maintains aspect ratio.
The first time a request is made, it is transformed in a lambda and that new version is saved to an S3 bucket. The next request for that size is served from the cache.
FAQs
Enhance/Architect plugin for transforming images
The npm package @enhance/arc-image-plugin receives a total of 6 weekly downloads. As such, @enhance/arc-image-plugin popularity was classified as not popular.
We found that @enhance/arc-image-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.