Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

img src=? #14

Open
nasr18 opened this issue May 10, 2016 · 1 comment
Open

img src=? #14

nasr18 opened this issue May 10, 2016 · 1 comment

Comments

@nasr18
Copy link

nasr18 commented May 10, 2016

I'm using jade template in my nodejs application. I will get detail about logged in user and have to show his profile image if anything is there. I'm using img src tag like <img src="{#user.img} || 'images/user.png'". How do i make it work????

@LostSenSS
Copy link

LostSenSS commented Jul 6, 2016

@nasr18

if user.image
  img(src= user.image)
else 
  img(src="images/user.png")

or

img(src= user.img || 'images/user.png')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants