Category : src

I’d like to pass the current img src to a function I’m working on (to get more data from a database) Is there a simple way to grab the src from within the img tag? I’d like to do this: <img src="http://example.com/images/1.jpg" alt="amazing image" data="<?php echo( get_extra_data($img_src) ); ?>" /> Rather than this: <img src="http://example.com/images/1.jpg" ..

Read more

i’m trying to display some stored images from the storage folder but it doesn’t show! here is the controller: public function store(Request $request) { $templates = new templates([ "image_path"=>$request->image->hashName(), "image_path2"=>$request->image2->hashName(), "image_path3"=>$request->image3->hashName(), ]); $request->image->store(‘uploads’); $request->image2->store(‘uploads’); $request->image3->store(‘uploads’); $templates->save(); here’s the src images: <td> <img src= "storage/app/public/uploads/{{$templates->image_path}}"></img></td> <td><img src= "storage/app/public/uploads/{{$templates->image_path2}}"></img></td> <td><img src="storage/app/public/uploads/{{$templates->image_path3}}"></img></td> Sourc..

Read more

I have a page on which there is a slide that shows one image among all the ones that are stored in my images/avatar folder. This slide is html and javascript coded. This is my page.html.twig (only the slide and form part) <div class="app-character_creation-center"> <div class="app-avatar-slider"> <button class="app-avatar-slide-btn-left app-nav-btn" onclick="plusDivs(-1)">❮</button> <img class="app-avatar-slide-img" src="{{ asset(‘images/avatars/001.png’) }}" ..

Read more