how to change profile picture on yii2 backend advanced - image

I am using yii2 advanced app . In that we have static profile pic in backend side. how to change that pic dynamically?? just like we change our profile pic in facebook and other social media. can we do this?
backend\views\layouts\left.php
<div class="pull-left image">
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle" alt="User Image"/>
</div>
how to change this image dynamically?

Related

Logo on Navbar Won't Show in Laravel Jetstream

So I learn Laravel Jetstream using Inertia Stack. While I was doing some changing on Logo in the Navbar on Dashboard view it's still showing.
But when I go to profile view, it's just gone, I don't know why, but if I try using blade function which is asset function, it'll be gone in dashboard view too.
This is my code on ApplicationMark.vue:
<template>
<img class="block h-9 w-auto" src="favicon.png" alt="Logo">
<!-- <img class="block h-9 w-auto" src="{{ asset('favicon.png') }}" alt="Logo"> -->
</template>

Laravel and Vue: How do I get images from my public folder in a Vue component?

I am trying to get a logo image from my public folder in my laravel and Vue application. The file is called index.vue and have the following structure:
<template>
<div>
<div class="header-container">
<div class="header-content">
<div class="logo-container">
<img :src="'/public/images/logo/black.png'" alt="logo">
</div>
</div>
</div>
<!-- Tell Vue where to render components -->
<router-view></router-view>
</div>
</template>
Here is the file structure and you can see that file exists and the path is correct:
But when I switch back to the view it looks like this:
I have also tried to call it the way I would in a blade template using {{ asset() }}, but this doesn't work and gives me a compiler error.
How do I get this image to load in my Vue file?
Not sure about vue + laravel. But, since its a relative path I dont think you need to bind anything.
<img src="/images/logo/black.png" alt="logo">

Vue Bootstrap img not displaying from assets folder

I am trying to display an image like what is done in this tutorial https://bootstrap-vue.js.org/docs/components/image/
Here is my code
<template>
<b-container fluid class="p-4 bg-dark">
<b-row>
<b-col>
<b-img rounded="circle" thumbnail fluid src="require('../assets/sweetcart.jpg')" alt="Thumbnail" />
</b-col>
<b-col>
<b-img rounded="circle" thumbnail fluid src="https://picsum.photos/250/250/?image=58" alt="Thumbnail" />
</b-col>
<b-col>
<b-img rounded="circle" thumbnail fluid src="https://picsum.photos/250/250/?image=59" alt="Thumbnail" />
</b-col>
</b-row>
</b-container>
</template>
Here is my file structure, although im sure the file path for the image is correct as I have been able to display the image in its own div tag, issue seems to be something to do with bootstrap?
I am working within the Home.vue file.
Thanks for any help!
I managed to fix this by placing the image in the static folder instead of the assets folder.
I am still curious as to why this wouldn't work in the assets folder?
These guys are discussing something similar but there seemed to be no definitive answer.
https://github.com/vuejs/Discussion/issues/202

Magento - header slider not rotating images

summary of problem.
When multiple images are uploaded and referenced in the header slider - only the first image will appear, it will not cycle through them at all.
I am using iosslider through magento
<!-- slider container -->
<div class="iosslider"><!-- slider -->
<div class="slider"><!-- slides -->
<div class="slide"><img src="{{media url="wysiwyg/eg_mainheader.jpg"}}" alt="" data-srcx2="{{media url="wysiwyg/eg_mainheader#x2.jpg"}}" /></div>
<div class="slide"><img src="{{media url="wysiwyg/eg_mainheader_men.jpg"}}" alt="" data-srcx2="{{media url="wysiwyg/eg_mainheader_men#x2.jpg"}}" /></div>
</div>
</div>
There is my current coding for the static block.
Our URL is earthgrownclothing.com - it is currently displaying both images at once.
and here are the setting for the slider on magento backend
Enabled: Yes
Auto Slide: Yes
Auto Slide Timer: 5000
auto slide trans timer: 750
Please check the following:
Install firebug in firefox browser and open website in firefox.
Press f12, when firebug window is opened, click on console link.
Refresh page.
There must be some js error in console. Just fix that error and your slider will be alive again. :)

How do I play videos in my website?r

The videos I want to play are in my computer. I have read the forums and guides and I only found guides that lets you play videos uploaded in a video hosting site like JW player and Kaltura. Is there a way to play videos coming directly from my computer? For example by using the path of the file not the link of the uploaded file in the video hosting site. Btw I'm making a youtube like website.
This is my view:
<body>
<div id="container">
<h1>Welcome</h1>
<div id="body">
<div id="div2">
<a href='<?php echo base_url()."main/search"; ?>'>Search!</a>
<br>
<a href='<?php echo base_url()."main/upload"; ?>'>Upload!</a>
<?php echo "<br>"; ?>
<a href='<?php echo base_url()."main/myAccount"; ?>'>Edit my Account!</a>
<?php echo "<br>"; ?>
<a href='<?php echo base_url()."main/logout" ?>'>Logout</a>
</div>
<div id ="searchBox">
<video width="320" height="240" controls >
<source src="videos\53e38a25e298a.mp4" type="video/mp4">
<source src="video\videos\53e38a25e298a.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</div>
</div>
<p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
</div>
</body>
I'm trying to play a video (specific location for now) from my computer. But it won't play and it just show the player and play button and progress bar.
Update: I'm currently using xampp and codeigniter as the framework.
I tried creating a single webpage placed in my Desktop using the code above and placed the video in my Desktop and it worked. But when I am using codeigniter it does not play. I've tried putting the video clips inside my view folder but still it won't work.
Have a look into HTML5 Video, you can play videos in a similar way to how you would usually add an image from your computer into a website.
http://www.w3schools.com/html/html5_video.asp
I've solved the problem, it seems that the path is indeed incorrect. The correct path is localhost/video/videos/53e38a25e298a.mp4

Resources