Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@hint/hint-image-optimization-cloudinary
Advanced tools
hint that that checks using Cloudinary's API if images are optimized
image-optimization-cloudinary
)image-optimization-cloudinary
uses the Cloudinary
service to analyze your images and see if there could be size savings
on them.
Note: To use this hint you will need to have an account in this
service and configure it to use those credentials via the
CLOUDINARY_URL
environment variable or in
the hint’s configuration. You can create a free account here.
As of September 15th, 2017, and based on HTTP Archive, images account for a bit over 53% of the size of a website in average, or 1,810kB.
By having your images optimized, you will help your users have a better and faster experience when navigating in your website.
This hint will use Cloudinary’s infrastructure to upload any images found and check if they can be optimized maintaining the same resolution and format.
Yes, if you don’t want to use the CLOUDINARY_URL
environment variable
to set up your credentials, you can pass them to the hint via the hint
configuration from the .hintrc
file:
{
"connector": {...},
"formatters": [...],
"hints": {
"image-optimization-cloudinary": ["error", {
"apiKey": "your api key",
"apiSecret": "your api secret",
"cloudName": "your cloud name"
}],
...
},
...
}
By default, this hint will notify you even if there is a 1kB savings.
If you want to change the threshold
you can do it by having something
as the following in the .hintrc
file:
{
"connector": {...},
"formatters": [...],
"hints": {
"image-optimization-cloudinary": ["error", {
"threshold": 10
}],
...
},
...
}
The threshold
value will be used for the savings per image, and the
total possible savings.
threshold
configured and an image whose savings is equal
or greater than the configured value.threshold
configured and several images whose individual
savings is less than threshold
but when combined it’s greater.
For example, if you configure a threshold
of 10, and you have one
image that could be 6kB smaller, and another one that could be 5kB
smaller, this hint will report an issue because the combined savings
is greater than 10.threshold
configured and the combined savings of all
images smaller to that value.To use it you will have to install it via npm
:
npm install @hint/hint-image-optimization-cloudinary
Note: You can make npm
install it as a devDependency
using the
--save-dev
parameter, or to install it globally, you can use the
-g
parameter. For other options see npm
's
documentation.
And then activate it via the .hintrc
configuration file:
{
"connector": {...},
"formatters": [...],
"hints": {
"image-optimization-cloudinary": "error",
...
},
"parsers": [...],
...
}
FAQs
hint that that checks using Cloudinary's API if images are optimized
The npm package @hint/hint-image-optimization-cloudinary receives a total of 11,486 weekly downloads. As such, @hint/hint-image-optimization-cloudinary popularity was classified as popular.
We found that @hint/hint-image-optimization-cloudinary demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.