weixin_39729262 2020-11-30 14:02
浏览 0

Response times increase when making glide requests in a loop

I am building a Laravel 8 app. I have some images related to products.

When I loop the images the response times from my local environment grow with each request. See the screenshot:

image

I am using the exact code from the controller shown in the docs:
https://glide.thephpleague.com/1.0/config/integrations/laravel/#installation

My route is:
Route::get('glide/{path}', [App\Http\Controllers\GlideImageController::class, 'show'])->where('path', '.*');

And my view looks like this:


<x-test-layout>

     ($products as $product)
    {{-- <img class="max-w-sm" src="/storage/%7B%7B%20%24product->imageUrl()%20%7D%7D" alt=""> --}}
    <img class="max-w-sm" src="/glide/%7B%7B%20%24product->imageUrl()%20%7D%7D" alt="">


</x-test-layout>

The non- N.B. x-test-layout is just a bare bones html boiler plate.

Can anyone tell me what am I doing wrong?

该提问来源于开源项目:thephpleague/glide

  • 写回答

0条回答 默认 最新

    报告相同问题?