Socket
Book a DemoInstallSign in
Socket

image-optimize-cli

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-optimize-cli

A library for optimizing images dynamically based on user internet speed and quality settings.

0.0.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

image-optimize-cli

Contributors Last Commit npm version GitHub issues GitHub pull requests GitHub forks GitHub stars GitHub followers Sponsor on GitHub

Join our Discord Community:

Join Our Discord


`image-optimize-cli` is a library that dynamically optimizes images based on user internet speed and quality settings. It provides components for React, Vue, and Angular, and also supports plain JavaScript usage.

Installation

To install image-optimize-cli, run:

npm install image-optimize-cli

Usage

React

To use image-optimize-cli with React, import the OptimizeImage component and use it in your components:

import React from 'react';
import { OptimizeImage } from 'image-optimize-cli/react';
  
function App() {
  return (
    <div>
      <OptimizeImage src="image.jpg" alt="Image" />
    </div>
  );
}

Vue

To use image-optimize-cli with Vue, import the OptimizeImage component and use it in your components:

<template>
  <div>
    <OptimizedImage src="image.jpg" alt="Image" />
  </div>
</template>

<script>
import { OptimizeImage } from 'image-optimize-cli/vue';

export default {
  components: {
    OptimizeImage,
  },
};
</script>

Angular

To use image-optimize-cli with Angular, import the OptimizeImage component and use it in your components:

import { Component } from '@angular/core';
import { OptimizeImage } from 'image-optimize-cli/angular';

@Component({
  selector: 'app-root',
    template: `
        <div>
        <OptimizeImage src="image.jpg" alt="Image"></OptimizeImage>
        </div>
    `,
})
export class AppComponent {}

JavaScript

To use image-optimize-cli with plain JavaScript, import the OptimizeImage class and use it in your scripts:

import { OptimizeImage } from 'image-optimize-cli';

const OptimizeImage = new OptimizeImage('image.jpg', 'Image');
document.body.appendChild(OptimizeImage);

Contributing

We welcome contributions to the project! Please follow the guidelines in CONTRIBUTING.md for submitting issues and pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details. include.

Keywords

image-optimization

FAQs

Package last updated on 23 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.