Answer the question
In order to leave comments, you need to log in
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
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.
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.
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 questionAsk a Question
731 491 924 answers to any question