How are you setting it? Embed? Url?
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.
@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..">
@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
@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
@van1310 Yeah that is just a proxy for gmail. But I assume the image works then?
@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?
@van1310 It should just work.. It add the proxy to all images.. Check any other mail you have with images (in gmail)
@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
@van1310 Gmail will always add the proxy, and it will only work with images google can access (so no local files)
@Sinnbeck yes but in my case its not working outside local server(localhost) i told you previously my domain also not working https://pms-staging.abc.com/images/logo.svg
so in this case why my server also not working
@van1310 That url isnt working for me either. Maybe it only works for you?
You could try to embed the images instead. Then they are part of the mail https://laravel.com/docs/8.x/mail#inline-attachments
@Sinnbeck yes in client privacy so i sent you dummy url so abc replace my domain name
@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')) }}">
@van1310 dont use the asset helper.. embed takes the path to the image.. For instance
<img src="{{ $message->embed(public_path('/images/logo.svg')) }}">
@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.
@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..
<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?
@van1310 I have absolutely no clue..
@Sinnbeck okay thank you much appreciated
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
@ashoor please make a new thread with the problem :)
Please or to participate in this conversation.