Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

146
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda