Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offer warning before generating preview "quick-add steps" on very large images #922

Closed
jywarren opened this issue Mar 22, 2019 · 7 comments · Fixed by #1180
Closed

Offer warning before generating preview "quick-add steps" on very large images #922

jywarren opened this issue Mar 22, 2019 · 7 comments · Fixed by #1180

Comments

@jywarren
Copy link
Member

Uploading a big image (actually like any image from a smartphone camera 😂 📸 🤳 ) stalls out the sequencer because of the preview images. A few ideas:

  1. we could not generate previews for the small steps if the image size is over a certain threshold, instead showing a message Generating previews for images this large may take a while. _Do it anyways_? so it can be overridden...
  2. do we generate the preview resize once, then pass it to each preview step, or do we generate it multiple times from the original image?
  3. make resizing images faster with optimization of the resize module?

Just thinking how we could smooth this out a bit!

@harshithpabbati
Copy link

harshithpabbati commented Mar 31, 2019

@jywarren may be this is a solution for this https://sharp.pixelplumbing.com/en/stable/ and for even #961

@harshithpabbati
Copy link

Coverting larger images to friendly image formats. What do you say about it???

@harshkhandeparkar
Copy link
Member

@jywarren I had mentioned about it in #955.
Also I think the images have to be downsclaes for the previews.

On my phone, the phone takes 15secs to even show the image in the load-image step and takes atleast 1.5 min to generate the previews. Then I actually saw the resolution, 3480x4610 and my phone is 3yrs old.

Without downscaling the imgs, the previews will just stop the page.

@jywarren
Copy link
Member Author

jywarren commented Apr 1, 2019 via email

@aashna27 aashna27 self-assigned this Apr 3, 2019
@aashna27
Copy link

aashna27 commented Apr 3, 2019

I am pursuing this , adding this in my proposal.

@harshkhandeparkar
Copy link
Member

@aashna27 please have a look at the discussion in #955. Try to adding an option to stop previews altogether, if you want/can/have time. Thanks.

@jywarren
Copy link
Member Author

Noting for the preview refactor, we could add an intermediate sequencer object before passing to generatePreview:

function generatePreview(previewStepName, customValues, path, selector) {
var previewSequencer = ImageSequencer();

We could do it just before passing the image to this iterator:

Object.keys(previewSequencerSteps).forEach(function (step, index) {
generatePreview(step, Object.values(previewSequencerSteps)[index], src, selector);
});

This was referenced Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants