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

149
Views
How to set custom url for loading images on page

I have set this path for loading images:

<img src="{{\Illuminate\Support\Facades\Storage::url($newest->uploaded->where('upf_uploaded_as', 'feature_image')->where('upf_dimension', '200x200')->first()->upf_path)}}" class="card-img-top" alt="">

And this is basically going to the URL of the current website domain and open up storage/upload/1399/10/images/{imagename}.

But now, I need to specify another URL as a domain. So instead of this:

http://currentwebsite.com/storage/upload/1399/10/images/PCVS511-5 (1).jpg

This will load the images:

http://differentwebsite.com/storage/upload/1399/10/images/PCVS511-5 (1).jpg

So the path that calls storage/upload/1399/10/images/{imagename} is the same. The domain name is just different. But I don't know how to give my custom URL to this.

So if you know, please help me out with this, cause I really need it.

Thanks.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can create another drive for the storage (found in config/filesystems.php), which has the same configuration as the original, but has a different setting for the url option:

'other_public' => [
    'driver' => 'local',
    'root' => storage_path('app/public'),
    'url' => 'http://differentwebsite.com/storage',
    'visibility' => 'public',
],

Documentation

over 4 years ago · Santiago Trujillo Report
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!