alexcorvi / heic2any

Converting HEIF/HEIF image formats to PNG/GIF/JPEG in the browser
https://alexcorvi.github.io/heic2any/
MIT License
585 stars 74 forks source link

Script Freezes on production deploy #6

Closed zacharytyhacz closed 4 years ago

zacharytyhacz commented 4 years ago

Hello, thanks for creating this heic2any library for us.

I'm using nuxtjs, and running the nuxt build command to minify and prepare the project source code for a production deploy. See: https://nuxtjs.org/guide/commands#server-side-rendered-deployment-universal-ssr-

This is the minimal code I'm using at the moment:

var heic2any = require('heic2any');
file = await heic2any({
    blob: file,
    toType: "image/jpeg",
    quality: 0.75,
});

In dev-mode is works fine, though once in production mode my whole browser freezes and my cpu usage goes through the roof. This happens on all browsers and can be reproduced on other people's devices as well. Also, there is no errors in the console

( Mac High Sierra 10.13 - on Firefox, Chrome, and Safari)

Also, on mobile IOS devices via Safari, it still breaks, though the image conversion breaks and the resulting output image is a broken image. See below: image

Any idea whats going on?

leovvay commented 4 years ago

have same thing here, it's just frozen on prod

Pinkdonuts commented 4 years ago

have same error too.

domeknn commented 4 years ago

+1

alexcorvi commented 4 years ago

I'm not very familiar with nuxt.js and Vue. Please check if your issue with is solved in the 0.0.3 release, if not then a recreation of the bug in a repo would be really appreciated.

0.0.3 release note

zacharytyhacz commented 4 years ago

@alexcorvi Ok, I'll put a minimal project together within the next couple days ( unless some else out there has one )

I haven't tried out with that latest 0.0.3 release, I will give that shot as well

thanks

zacharytyhacz commented 4 years ago

Hello everyone.

I attempted the same exact code and project with the latest 0.0.3 version and everything works.

I'm having trouble creating a minimal test project for 0.0.1 because for nuxt it has to built for production, not just development.

I'm going to close this, 0.0.3 did stuff that fixed it.