mardi 28 août 2018

Glide library | image not loading up

im trying to enable this library for my localhost environment.

http://glide.thephpleague.com/1.0/config/integrations/laravel/

Current Laravel Version 5.5

gd2 is enabled in wamp extensions.

I cant seem to find where the problem is.

Path is ok, image exists on it.

See following code for server config.

$server = ServerFactory::create([
            'response' => new LaravelResponseFactory(app('request')),
            'source' => $source,
            //'cache' => new Filesystem(new Adapter('../storage/app/cache/')),
            'cache' => $cache,
            'cache_path_prefix' => '.cache',
            'base_url' => 'transform-img',
        ]);

now i use this

return $server->getImageResponse($path, request()->all());

it does not give any error.

when i dd() this, i get this response.

StreamedResponse {#1151 ▼
  #callback: Closure {#1177 ▶}
  #streamed: false
  -headersSent: false
  +headers: ResponseHeaderBag {#1176 ▶}
  #content: null
  #version: "1.0"
  #statusCode: 200
  #statusText: "OK"
  #charset: null
}

as statusCode shows 200 and there is no error for file not found, still it does not load any image but shows a placeholder on browser when i navigate.

What can be the issue. if i try to replace image name with any other random string i get error for image not found. so this means it does find the image. thou it fails to render the image.

I have googled, searched on their github comments, could not find any problem similar as mine.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MztENV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire