Profile pictures on e-mail

Melih
Melih
@melih
4 years ago
198 posts
Hello guys,

I am having a problem for a while now but i didn't have time to ask you about it. I made myself a module to send e-mails weekly to notify users about anniversaries for the upcoming week. I am not sure when exactly this problem occured but it's been like this for a while now. For example as you can see in the attached pictures, Gmail is not showing the profiles pictures but the other ones i checked like hotmail is showing pictures without problem. Gmail can show the default profile pictures that system shows for the profiles without an uploaded profile picture as you can see in the attached picture. But somehow doesn't show the uploaded pictures as described above. Do you have any idea what might cause this problem and how can i fix it?
gmail.PNG
gmail.PNG  •  86KB

hotmail.PNG
hotmail.PNG  •  83KB


updated by @melih: 10/18/20 10:32:02PM
nate
@nate
4 years ago
911 posts
Can you show us the code in your email template?
Melih
Melih
@melih
4 years ago
198 posts
Hi @nate, i am sorry i didn't have time before, busy week :(

here is my temlate:

<div style="font-size: 16px;">
  <div style="font-size: 18px;">
    Hello {$username},<br>There are anniversaries will take place next week:
  </div>

  {capture name="s_tpl" assign="s_tpl"}
  {literal}
  {if isset($_items)}
  {foreach $_items as $item}
    {if $item.profile_include_yildonumu != 'cikar'}
      {if $item.event_type == 'marriage'}
        {if $item.profile_gender == 'female'}
        <div style="display:table; padding-bottom: 5px;">
          <div style="display:table-cell">
            {if isset($item.event_image_size) && $item.event_image_size > 0}
              {jrCore_module_url module="jrGenEvent" assign="murl"}
              {jrCore_module_url module="jrGenSource" assign="surl"}
              <img src="{$jamroom_url}/{$murl}/image/event_image/{$item._item_id}/icon/crop=portrait/_v={$item.event_image_time}" width="68" style="border-radius: 8px;" alt="{$item.event_source_img_title|jrCore_entity_string}" title="{$item.event_source_img_title|jrCore_entity_string}">
            {elseif isset($item.event_source_img)}
              <img src="{$item.event_source_img}/icon/crop=portrait" width="68" style="border-radius: 8px;" alt="{$item.event_source_img_title|jrCore_entity_string}" title="{$item.event_source_img_title|jrCore_entity_string}">
            {else}<img src="{$jamroom_url}/img/rings.png" width="68">
            {/if}
          </div>
          <div style="display:table-cell;vertical-align:middle;padding:0 5px 0 12px">
            {$item.event_date|jrGenCore_get_day} {$item.event_date|jrGenCore_get_readable_month} {$item.event_date|jrGenCore_get_year} <br>
            <a href="{$jamroom_url}/{$item.profile_url}"><span style="color: #336699;">{$item.profile_first_name}{if isset($item.event_linked_person) && strlen($item.event_linked_person) > 0} and {$item.event_linked_person}&apos;s{/if} wedding anniversary</span></a>
          </div>
        </div>
        {/if}
      {else}
        <div style="display:table; padding-bottom: 5px;">
          <div style="display:table-cell;">
            {if $item.profile_image_size > 0}
              {jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_image" item_id=$item._profile_id size="icon" crop="portrait" width="68" style="border-radius: 8px;" alt=$item.profile_name title=$item.profile_name}
            {elseif isset($item.profile_gender)}
              {jrCore_image module="jrGenCore" image="`$item.profile_gender`.png" alt=$profile_name width=68}
            {else}
              {jrCore_image module="jrGenCore" image="unknown.png" alt=$profile_name width=68}
            {/if}
          </div>
          <div style="display:table-cell;vertical-align:middle;padding:0 5px 0 12px">
            {$item.event_date|jrGenCore_get_day} {$item.event_date|jrGenCore_get_readable_month} {$item.event_date|jrGenCore_get_year} <br>
            <a href="{$jamroom_url}/{$item.profile_url}"><span style="color: #336699;">{$item.profile_name}&apos;s {if $item.event_type == 'birth'}birthday{elseif $item.event_type == 'death'}death anniversary{/if}</span></a>
          </div>
        </div>
      {/if}
    {/if}
  {/foreach}
  {/if}
  {/literal}
  {/capture}
    
  {assign var="bugun" value=date("md")}
  {assign var="bir" value=date("md", strtotime("+1 days"))}
  {assign var="iki" value=date("md", strtotime("+2 days"))}
  {assign var="uc" value=date("md", strtotime("+3 days"))}
  {assign var="dort" value=date("md", strtotime("+4 days"))}
  {assign var="bes" value=date("md", strtotime("+5 days"))}
  {assign var="alti" value=date("md", strtotime("+6 days"))}
  {assign var="yedi" value=date("md", strtotime("+7 days"))}
  
  {jrCore_list module="jrGenEvent" search1="event_type = birth || event_type = death || event_type = marriage" search2="event_date like %$bir" limit="10" template=$s_tpl no_cache=true}
  {jrCore_list module="jrGenEvent" search1="event_type = birth || event_type = death || event_type = marriage" search2="event_date like %$iki" limit="10" template=$s_tpl no_cache=true}
  {jrCore_list module="jrGenEvent" search1="event_type = birth || event_type = death || event_type = marriage" search2="event_date like %$uc" limit="10" template=$s_tpl no_cache=true}
  {jrCore_list module="jrGenEvent" search1="event_type = birth || event_type = death || event_type = marriage" search2="event_date like %$dort" limit="10" template=$s_tpl no_cache=true}
  {jrCore_list module="jrGenEvent" search1="event_type = birth || event_type = death || event_type = marriage" search2="event_date like %$bes" limit="10" template=$s_tpl no_cache=true}
  {jrCore_list module="jrGenEvent" search1="event_type = birth || event_type = death || event_type = marriage" search2="event_date like %$alti" limit="10" template=$s_tpl no_cache=true}
  {jrCore_list module="jrGenEvent" search1="event_type = birth || event_type = death || event_type = marriage" search2="event_date like %$yedi" limit="10" template=$s_tpl no_cache=true}
</div>

updated by @melih: 07/20/20 12:43:28AM
nate
@nate
4 years ago
911 posts
Man that's one complex email template. The code looks like it should work and you say it works on hotmail. Have you gotten reports from other users using gmail? Perhaps it some sort of security setting in gmail?
michael
@michael
4 years ago
7,692 posts
If you grab the URL of the image from the email that arrives in google, take that and paste it in to the url and it shows then its google blocking it. If it doesn't show then "why doesn't it show" is what to look for.

Tags