vandan's avatar
Level 13

image not showing on gmail only

hii guys

the issue is when i send mail so in gmail not showing any image which i have set on mail blade file but other mail service provider like yopmail/mailtrap are showing image but only show on gmail so please guys any idea why my image not showing on gmail.

0 likes
22 replies
vandan's avatar
Level 13

@Sinnbeck URL

in my blade file

<td style="text-align: center; padding: 30px 0px;">
	<img style="width: 50%;" alt="" src="http://127.0.0.1:8000/images/logo.svg">
</td>

also my domain also not work someting like this type of url generate on gmail

	<img src="https://ci6.googleusercontent.com/proxy/F_CtfHCtqh8_YZzyxLvarP4n92xgjbxmO6uGelZ3HW7_6ZfZWWcKv4I-7Wj3j-Y-wgnmFIW_1Wg=s0-d-e1-ft#http://127.0.0.1:8000/images/logo.svg" alt="logo" width="160" height="40" class="CToWUd" jslog="138226; u014N:xr6bB; 53:W2ZhbHNlXQ..">
Sinnbeck's avatar

@van1310 Pretty sure they wont allow you to use a local url like that. You need to use an url that is accessible from outside your own computer

1 like
vandan's avatar
Level 13

@Sinnbeck yes i also try this but this also same result see

i try with my domain https://pms-staging.abc.com/images/logo.svg

but in when send mail then show this type of url on gmail

https://ci4.googleusercontent.com/proxy/i5HSZmm10cf0kd0xZKQqK4gE1QekPr0t5_W_vfhvmpCdyC7D0cX09xaT-ps76xRWVy5mOSkb-wOmFenGqMLBkNTNJA=s0-d-e1-ft#https://pms-staging.abc.com/images/logo.svg
Sinnbeck's avatar

@van1310 Yeah that is just a proxy for gmail. But I assume the image works then?

vandan's avatar
Level 13

@Sinnbeck yes when i remove proxy then worked fine this image but how to manage this proxy issue on my gmail may be its my code side any change or gmail settings?

Sinnbeck's avatar

@van1310 It should just work.. It add the proxy to all images.. Check any other mail you have with images (in gmail)

vandan's avatar
Level 13

@Sinnbeck yes other mail work fine but i used to gmail for so how to manage proxy on gmail or avoid proxy any idea how to manage this

Sinnbeck's avatar

@van1310 Gmail will always add the proxy, and it will only work with images google can access (so no local files)

vandan's avatar
Level 13

@Sinnbeck yes in client privacy so i sent you dummy url so abc replace my domain name

vandan's avatar
Level 13

@Sinnbeck yes i checked this documentation but when i set embed url on my blade file so thats my page loading infinte time not any response

	<img src="{{ $message->embed(asset('/images/logo.svg')) }}">
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@van1310 dont use the asset helper.. embed takes the path to the image.. For instance

	<img src="{{ $message->embed(public_path('/images/logo.svg')) }}">

2 likes
vandan's avatar
Level 13

@Sinnbeck its working fine

but i m not understading why this happen can you explain for my clarification because on earlier days i never face this type of issue.

Sinnbeck's avatar

@van1310 I think gmail works by downloading the image and uploading it to their proxy.. So if they cant access it, they cant download it..

1 like
vandan's avatar
Level 13

@Sinnbeck

<img src="https://cdn.pixabay.com/photo/2015/03/04/22/35/head-659652_960_720.png">

this image is publicly access but gmail does not display. it will worked on earlier days so why this happen now because this image url is public so why gmail cannot access this image?

ashoor's avatar

@Sinnbeck

Thank you in advanced

I tried "inline attachment"

<img src="{{ $message->embed(public_path('/qrcodes/'.$id.'.svg')) }}" alt="qrcode" class="qrcode">

and I faced this error

ErrorException: Undefined variable $message in

I'm using dawnmark temp and html inside it

in doc say: Laravel automatically makes the $message variable available to all of your email templates, so you don't need to worry about passing it in manually:

so why i'm facing this error

Please or to participate in this conversation.