How to get image file in user-end from database that is stored by backpack image field and is encrypted having cropped information
Hi @usmanhafeez147 ,
Have you used image or base64_image field?
I used Image and it stores encrypted in database as image file name
I also tried adding Mutator setImgeAttribute($value){} in photo model. I thing is not working
When you say encrypted, do you mean you're encrypting it yourself?
What normally happens is when you crop the image on the frontend, it sends a base64 encoded string to the server.
When it saves you need to add a mutator for your field.
If your field is called image then use setImageAttributeif its called photo call it setPhotoAttribute - if you do not understand how mutators/accessors work read here -> https://laravel.com/docs/5.3/eloquent-mutators#accessors-and-mutators
If you do not define a mutator for your field which will convert it to a file and return a string, it will save the base64 encoded version to the database.
can you please send me example project with backpack image field and showing it on home.blade.php user-front-end
The documentation gives a working example in the admin. You need to learn how laravel works.
If you share your controller, model and database table scheme we can point out your mistake.
The front end is up to you using laravel. Backpack is an Admin.

is this encrypted of image file of backpack
Well that escalated quickly :-)
@usmanhafeez147 , please use the example in the documentation. Just checked it and it works perfectly, so it's definitely not a bug.
If you're getting a base64 encoded image in the database, you must have missed a step in the documentation or used the base64_image field instead.
For your next support question, please post on StackOverflow, like it says in CONTRIBUTING.md. Really important we keep Github issues only for bugs, as it helps us make a squash bugs and create features faster.
Cheers!
Most helpful comment
Well that escalated quickly :-)
@usmanhafeez147 , please use the example in the documentation. Just checked it and it works perfectly, so it's definitely not a bug.
If you're getting a base64 encoded image in the database, you must have missed a step in the documentation or used the base64_image field instead.
For your next support question, please post on StackOverflow, like it says in CONTRIBUTING.md. Really important we keep Github issues only for bugs, as it helps us make a squash bugs and create features faster.
Cheers!