Giter VIP home page Giter VIP logo

Comments (2)

ornel-lloyd-edano avatar ornel-lloyd-edano commented on June 2, 2024

Proposed solutions

  1. Place a limit on the dimensions of the image that can be cropped
  2. No cropping dimension limits but make the call to image cropping asynchronous
  3. Keep synchronous call but do not display the cropped image thumbnails on the left side panel if the corresponding crop id from S3 is not found in image exports of ES
  4. Keep synchronous call and keep displaying the cropped image thumbnails on the left side panel even if the corresponding crop id is not found in image exports of ES. But during download of the cropped image, do not check ES for the exports entry, just download cropped image directly from S3

from grid.

andrew-nowak avatar andrew-nowak commented on June 2, 2024

There's 2 problems here: the inconsistency, and the fact that crops fail.

inconsistency

Broadly, this is down to the way that crops in the UI are driven by the cropper service, which draws its data from S3 rather than elasticsearch. As far as I'm aware this is unique - every other piece of data shown in grid comes from elasticsearch via media-api. I think then that the solution to the inconsistency is to draw crops data from the media-api response(s); as far as I can tell all of the required data is included, the only functionality difference is that the cropper controller adds the download links - these could (should) also be added to the media-api response.

crops fail

This is due to a limit on how much resource can be used. Cropping can be expensive depending on how big the image is, and it is also possible for users to request lots of expensive crops simultaneously - in fact we provide this functionality by allowing users to select multiple images and create fullframe crops of all.


Regarding the proposed solutions:
adding a limit on dimensions will be extremely unpopular with users (although worth noting that whatever other option we take, a de facto limit will exist; hopefully so large that users never encounter it).

Making the cropping call asynchronous will be the real solution - I have ambitions in this area but I think it will require architectural changes so unfortunately is not imminent.

For now the best I can suggest is to fix the inconsistency by using the already-fetched image data to fill the crops panel and generating the download urls in the media-api response, and then to review the scaling of cropper instances (instance size and quantity) and the resources made available to imagemagick on each instance.

from grid.

Related Issues (20)

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.