Giter Site home page Giter Site logo

imageengine-react's People

Contributors

bvinod007 avatar jonarnes avatar kamermans avatar mnussbaumer avatar powell-v2 avatar renovate[bot] avatar rohanraina513 avatar srinidhi-saravanan avatar ssrbloginsoft avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

imageengine-react's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/publish.yml
  • actions/checkout v4
  • actions/setup-node v4
npm
package.json
  • @imageengine/imageengine-helpers ^0.2.1
  • @types/react ^18.2.47
  • typescript ^5.2.2
  • react ^17.0.2 || ^18.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

add support for maxdpr directive

maxdpr is a url directive wich define a maxumum DPR (Device Pixel Ratio) to consider when resizing an image. maxdpr can take values from 1 to 4 (including).

image.png?imgeng=/maxdpr_2 will cap the dpr to 2 even if the device has a a screen supporting dpr of 4, for example.

Exposing constructUrl as part of the official exports?

Hi,

I was doing some work with creating custom loaders with Next.js' Image component and ran into the issue of creating the correct query strings for IE's urls.

So instead of re-writing all that logic, I thought it would be useful to use the constructUrl function that this package has. While it's possible to import that by giving the correct path inside the node_modules folder, e.g:

import { constructUrl } from "@imageengine/react/build/utils/index.js";

It doesn't look that official. If for instance the underlying function names, or file structure changes the import would be broken.

My thought was that if this was exposed as a normal export, then perhaps these sort of "helpers" could be packaged individually in another npm package. This React Image package could then use that lib, and anyone wanting to write a custom component, even outside of React, could choose to install that smaller utility package and benefit from having vetted, up to date, helpers. For instance if something would change in the directives that IE accepts itself, then it would be just a matter of updating those helpers since the logic to translate the set of directives into the query string would be responsibility of the package. It's not like there's a lot of upside, but seems like a good option to have nonetheless.

Anyway, for my immediate case just having it exported "officially" would work. Would this be something possible to do?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.