Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
how to retrieve data from database and display it inside preview section using image uploader js by:christianbayer

so i want to display data from database to preview using imageuploader js from cristianbayer, because i want to put it in post edit page, so i can change image which has been uploaded to database server. im using laravel btw.

see this pic : i want retrieve image data and put inside image preview section

this is my controller function

public function edit($id)
    {
        $products = Product::with(['users','categories','images'])->find($id);

        return view('dashboard.admin.products.edit', compact('products'));
    }

this is my html code to preview image :

<div class="input-field">
      <div class="input-images-1"></div>
</div>

this is my javascript :

<script>

let preloaded = [
    {id: 1, src: 'https://picsum.photos/500/500?random=1'},
    {id: 2, src: 'https://picsum.photos/500/500?random=2'},
    {id: 3, src: 'https://picsum.photos/500/500?random=3'},
    {id: 4, src: 'https://picsum.photos/500/500?random=4'},
    {id: 5, src: 'https://picsum.photos/500/500?random=5'},
    {id: 6, src: 'https://picsum.photos/500/500?random=6'},
];

$('.input-images-1').imageUploader({
    preloaded: preloaded,
    imagesInputName: 'files',
    maxSize: 2 * 1024 * 1024,
    preloadedInputName: 'old',
    maxFiles: 5

});

how to retrieve data from data base and put in preloaded image? or any other method i might be able to use?

any help will be greatly appreciated, thanks!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!