Skip to content
Advertisement

How to display image from aws s3 in blade laravel 5.2

I have created a method for getting the data(image file) from aws S3 like this :

JavaScript

I’m sure that those image is exist on the aws, so there is no problem with that. And then I use above method as the src in my blade view like this :

JavaScript

$myPath here already point to the specific file on aws for example : bucket/file.jgp. But when I run my webpage, this Html::Image gives a view like this : enter image description here

What’s going on here ? Why Html::image can’t render my image file ? 🙁

Advertisement

Answer

JavaScript

You can save the S3 URL in a config file and use the config value instead of writing actual value everytime.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement