A
A
an5432019-03-03 13:06:16
PHP
an543, 2019-03-03 13:06:16

Why is insert slow in Intervention?

Hello everyone, there is a Laravel project on OpenServer and Intervention for resizing images, if I use insert, then saving up to 10 seconds. What could be the reason?

$img = Image::make($file);
$img->resize(740, 340);
$watermark = Image::make('watermark.png');
$watermark->opacity(30);
$img->insert($watermark, 'bottom-right');
$img->save($path . $filename);

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
an543, 2019-03-10
@an543

It slows down the work a $watermark->opacity(30);lot. I saved the watermark with the transparency I need and insert it with the help of insert, the brakes are gone.

D
Dmitry Kuznetsov, 2019-03-04
@dima9595

Cause mb in OpenServer. Many have already asked similar questions (about performance with OpenServer). Try to run your code on Linux (ubuntu for example) - the speed should be higher.

A
Alexander Karabanov, 2016-10-14
@entermix

I go to the link: domain.com/uploads/txt.txt, the file is opened by http, but as soon as I go to httpS://.... and then try again to open http://... it opens httpS, why So?
Because:
I quote:
# Once a browser receives this header, it will never again access your resource via http (even if the user explicitly goes to http manually) until the max-age (in seconds) expires.
# at the same time, with each new visit to the site via https, the max-age counter will be updated
# use this parameter only when you are sure that https is configured correctly on each site and it is configured there forever.

Source: Large manual: part 17. Setting up SSL in nginx ... .
Now move uploads to a separate subdomain on which SSL will not be enabled

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question