Answer the question
In order to leave comments, you need to log in
How to speed up image output?
Good day, there are N-th number of images, when you hover the mouse over the image, its original size appears
$('.screen').mouseenter(function(event){
var src = event.target.getAttribute('src');
$("#multizoom2").attr("src", src);
});
header("Content-type: image/jpeg");
$img_from = imagecreatefromjpeg('https://pdacdn.com/userfiles/screens/' . $id_user . '/' . $id_file . '/' . $screen . '.jpg');
imageJpeg($img_from);
Answer the question
In order to leave comments, you need to log in
Preload, aka preload, for example.
Create a hidden img in which you prescribe an image so that by the time you hover it with the mouse it will already be in the browser cache.
I used to travel directly from Moscow to St. Petersburg, but now I started traveling through Latvia, the journey began to take longer, can I somehow get there faster?
why imagecreatefromjpeg if you can just readfile ?
Well, it's even better to set up proxy_pass in nginx with caching.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question