How to show image in custom email. Magento 2product image url not valid - magento 2.0.1Magento 2 : How to show ProductName and ProductPrice in custom email template?In magento how to format date in email template?display product's custom image in custom emailMagento 2 Add new field to Magento_User admin formHow to add custom attribute in new order confirmation email in Magento 1.9.3?In Magento 2 How to use CSS Grid in CMS pagesMagento 2: Image in custom email module?Magento 2.2: How to show a cutomer custom attribute on frontend?How to send Product Image in Mail. Magento 2

How did Captain America use this power?

Problems with numbers (result of calculations) alignment using siunitx package inside tabular environment

I’ve officially counted to infinity!

Topological Spaces homeomorphic

Disabling Resource Governor in SQL Server

The barbers paradox first order logic formalization

If Earth is tilted, why is Polaris always above the same spot?

What is the most remote airport from the center of the city it supposedly serves?

If Melisandre foresaw another character closing blue eyes, why did she follow Stannis?

Visa for volunteering in England

Can commander tax be proliferated?

How to reply this mail from potential PhD professor?

How do you center multiple equations that have multiple steps?

Would "lab meat" be able to feed a much larger global population

How to assert on pagereference where the endpoint of pagereference is predefined

Why debootstrap can only run as root?

Why do money exchangers give different rates to different bills

Why do computer-science majors learn calculus?

How do I tell my manager that his code review comment is wrong?

What happened to Ghost?

How to get SEEK accessing converted ID via view

Pigeonhole Principle Problem

Selecting a secure PIN for building access

Is Cola "probably the best-known" Latin word in the world? If not, which might it be?



How to show image in custom email. Magento 2


product image url not valid - magento 2.0.1Magento 2 : How to show ProductName and ProductPrice in custom email template?In magento how to format date in email template?display product's custom image in custom emailMagento 2 Add new field to Magento_User admin formHow to add custom attribute in new order confirmation email in Magento 1.9.3?In Magento 2 How to use CSS Grid in CMS pagesMagento 2: Image in custom email module?Magento 2.2: How to show a cutomer custom attribute on frontend?How to send Product Image in Mail. Magento 2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I'm getting my custom data from email function and also I'm getting the Product image URL to show it in mail now I tried many ways to show my image in email but its not working for me my custom email code is



 template config_path="design/email/header_template" 
<p align="center"><b style="color: #009900">Name:</b> trans "%name" name=$name</p>
<p align="center"><b style="color: #009900">Email:</b> trans "%email" email=$email</p>
<p align="center"><b style="color: #009900">Phone Number:</b> trans "%pnumber" pnumber=$pnumber</p>
<p align="center"><b style="color: #009900">Offer Amount:</b> trans "%offeramount" offeramount=$offeramount</p>
<p align="center"><b style="color: #009900">Message:</b> trans "%message" message=$message</p>
<p align="center"><b style="color: #009900">Product Name:</b> trans "%product_name" product_name=$product_name</p>
<p align="center"><b style="color: #009900">Product Price:</b> trans "%product_price" product_price=$product_price</p>
<p align="center"><b style="color: #009900">URL:</b> trans '%imgUrl' imgUrl=$imgUrl</p>
<!-- <img src="">trans '%imgUrl' imgUrl=$imgUrl</img> -->
<!-- <img src="trans '%imgUrl' imgUrl=$imgUrl"> -->
<img src="view url='%imgUrl'" height="30" width="30" alt="trans 'Custom image'" />
template config_path="design/email/footer_template"


I get the code from net which is



 <img
width="180"
height="52"
src="view url='images/email/youtube.jpg'"
alt="Website Youtube"
/>


but now my question is how can I set Dynamic URL in place of fixed URL e.g in place of this URL images/email/youtube.jpg I want to set my URL










share|improve this question
























  • From wherever your email is been triggered after any action in controller you might be passing some variables just pass your email url also in email vars and consume them. For reference you can open any default Magento email templates.

    – Narendra Vyas
    Mar 20 at 16:01











  • Sir I also pass the url as well if you can see this code trans '%imgUrl' imgUrl=$imgUrl in above code that is URL which I firstly just print in <p> to check that URL is coming properly or not after that I tried this for <img> tag but at that place it is not working

    – Asad Khan
    Mar 20 at 16:06












  • Try src = " imgUrl"

    – Narendra Vyas
    Mar 20 at 16:11











  • Are you.trying from your local ? Make sure you don't have any issue in showing images in every email ?

    – Narendra Vyas
    Mar 20 at 16:13











  • Sir Actually firstly when I get the URL of the product then firstly I check it in phtml file for testing that is it getting the img of the product or not.. then its shows me the img perfectly after that I send the URL in the mail

    – Asad Khan
    Mar 20 at 16:15

















2















I'm getting my custom data from email function and also I'm getting the Product image URL to show it in mail now I tried many ways to show my image in email but its not working for me my custom email code is



 template config_path="design/email/header_template" 
<p align="center"><b style="color: #009900">Name:</b> trans "%name" name=$name</p>
<p align="center"><b style="color: #009900">Email:</b> trans "%email" email=$email</p>
<p align="center"><b style="color: #009900">Phone Number:</b> trans "%pnumber" pnumber=$pnumber</p>
<p align="center"><b style="color: #009900">Offer Amount:</b> trans "%offeramount" offeramount=$offeramount</p>
<p align="center"><b style="color: #009900">Message:</b> trans "%message" message=$message</p>
<p align="center"><b style="color: #009900">Product Name:</b> trans "%product_name" product_name=$product_name</p>
<p align="center"><b style="color: #009900">Product Price:</b> trans "%product_price" product_price=$product_price</p>
<p align="center"><b style="color: #009900">URL:</b> trans '%imgUrl' imgUrl=$imgUrl</p>
<!-- <img src="">trans '%imgUrl' imgUrl=$imgUrl</img> -->
<!-- <img src="trans '%imgUrl' imgUrl=$imgUrl"> -->
<img src="view url='%imgUrl'" height="30" width="30" alt="trans 'Custom image'" />
template config_path="design/email/footer_template"


I get the code from net which is



 <img
width="180"
height="52"
src="view url='images/email/youtube.jpg'"
alt="Website Youtube"
/>


but now my question is how can I set Dynamic URL in place of fixed URL e.g in place of this URL images/email/youtube.jpg I want to set my URL










share|improve this question
























  • From wherever your email is been triggered after any action in controller you might be passing some variables just pass your email url also in email vars and consume them. For reference you can open any default Magento email templates.

    – Narendra Vyas
    Mar 20 at 16:01











  • Sir I also pass the url as well if you can see this code trans '%imgUrl' imgUrl=$imgUrl in above code that is URL which I firstly just print in <p> to check that URL is coming properly or not after that I tried this for <img> tag but at that place it is not working

    – Asad Khan
    Mar 20 at 16:06












  • Try src = " imgUrl"

    – Narendra Vyas
    Mar 20 at 16:11











  • Are you.trying from your local ? Make sure you don't have any issue in showing images in every email ?

    – Narendra Vyas
    Mar 20 at 16:13











  • Sir Actually firstly when I get the URL of the product then firstly I check it in phtml file for testing that is it getting the img of the product or not.. then its shows me the img perfectly after that I send the URL in the mail

    – Asad Khan
    Mar 20 at 16:15













2












2








2








I'm getting my custom data from email function and also I'm getting the Product image URL to show it in mail now I tried many ways to show my image in email but its not working for me my custom email code is



 template config_path="design/email/header_template" 
<p align="center"><b style="color: #009900">Name:</b> trans "%name" name=$name</p>
<p align="center"><b style="color: #009900">Email:</b> trans "%email" email=$email</p>
<p align="center"><b style="color: #009900">Phone Number:</b> trans "%pnumber" pnumber=$pnumber</p>
<p align="center"><b style="color: #009900">Offer Amount:</b> trans "%offeramount" offeramount=$offeramount</p>
<p align="center"><b style="color: #009900">Message:</b> trans "%message" message=$message</p>
<p align="center"><b style="color: #009900">Product Name:</b> trans "%product_name" product_name=$product_name</p>
<p align="center"><b style="color: #009900">Product Price:</b> trans "%product_price" product_price=$product_price</p>
<p align="center"><b style="color: #009900">URL:</b> trans '%imgUrl' imgUrl=$imgUrl</p>
<!-- <img src="">trans '%imgUrl' imgUrl=$imgUrl</img> -->
<!-- <img src="trans '%imgUrl' imgUrl=$imgUrl"> -->
<img src="view url='%imgUrl'" height="30" width="30" alt="trans 'Custom image'" />
template config_path="design/email/footer_template"


I get the code from net which is



 <img
width="180"
height="52"
src="view url='images/email/youtube.jpg'"
alt="Website Youtube"
/>


but now my question is how can I set Dynamic URL in place of fixed URL e.g in place of this URL images/email/youtube.jpg I want to set my URL










share|improve this question
















I'm getting my custom data from email function and also I'm getting the Product image URL to show it in mail now I tried many ways to show my image in email but its not working for me my custom email code is



 template config_path="design/email/header_template" 
<p align="center"><b style="color: #009900">Name:</b> trans "%name" name=$name</p>
<p align="center"><b style="color: #009900">Email:</b> trans "%email" email=$email</p>
<p align="center"><b style="color: #009900">Phone Number:</b> trans "%pnumber" pnumber=$pnumber</p>
<p align="center"><b style="color: #009900">Offer Amount:</b> trans "%offeramount" offeramount=$offeramount</p>
<p align="center"><b style="color: #009900">Message:</b> trans "%message" message=$message</p>
<p align="center"><b style="color: #009900">Product Name:</b> trans "%product_name" product_name=$product_name</p>
<p align="center"><b style="color: #009900">Product Price:</b> trans "%product_price" product_price=$product_price</p>
<p align="center"><b style="color: #009900">URL:</b> trans '%imgUrl' imgUrl=$imgUrl</p>
<!-- <img src="">trans '%imgUrl' imgUrl=$imgUrl</img> -->
<!-- <img src="trans '%imgUrl' imgUrl=$imgUrl"> -->
<img src="view url='%imgUrl'" height="30" width="30" alt="trans 'Custom image'" />
template config_path="design/email/footer_template"


I get the code from net which is



 <img
width="180"
height="52"
src="view url='images/email/youtube.jpg'"
alt="Website Youtube"
/>


but now my question is how can I set Dynamic URL in place of fixed URL e.g in place of this URL images/email/youtube.jpg I want to set my URL







magento2 email frontend backend






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 21 at 8:55







Asad Khan

















asked Mar 20 at 15:36









Asad KhanAsad Khan

39510




39510












  • From wherever your email is been triggered after any action in controller you might be passing some variables just pass your email url also in email vars and consume them. For reference you can open any default Magento email templates.

    – Narendra Vyas
    Mar 20 at 16:01











  • Sir I also pass the url as well if you can see this code trans '%imgUrl' imgUrl=$imgUrl in above code that is URL which I firstly just print in <p> to check that URL is coming properly or not after that I tried this for <img> tag but at that place it is not working

    – Asad Khan
    Mar 20 at 16:06












  • Try src = " imgUrl"

    – Narendra Vyas
    Mar 20 at 16:11











  • Are you.trying from your local ? Make sure you don't have any issue in showing images in every email ?

    – Narendra Vyas
    Mar 20 at 16:13











  • Sir Actually firstly when I get the URL of the product then firstly I check it in phtml file for testing that is it getting the img of the product or not.. then its shows me the img perfectly after that I send the URL in the mail

    – Asad Khan
    Mar 20 at 16:15

















  • From wherever your email is been triggered after any action in controller you might be passing some variables just pass your email url also in email vars and consume them. For reference you can open any default Magento email templates.

    – Narendra Vyas
    Mar 20 at 16:01











  • Sir I also pass the url as well if you can see this code trans '%imgUrl' imgUrl=$imgUrl in above code that is URL which I firstly just print in <p> to check that URL is coming properly or not after that I tried this for <img> tag but at that place it is not working

    – Asad Khan
    Mar 20 at 16:06












  • Try src = " imgUrl"

    – Narendra Vyas
    Mar 20 at 16:11











  • Are you.trying from your local ? Make sure you don't have any issue in showing images in every email ?

    – Narendra Vyas
    Mar 20 at 16:13











  • Sir Actually firstly when I get the URL of the product then firstly I check it in phtml file for testing that is it getting the img of the product or not.. then its shows me the img perfectly after that I send the URL in the mail

    – Asad Khan
    Mar 20 at 16:15
















From wherever your email is been triggered after any action in controller you might be passing some variables just pass your email url also in email vars and consume them. For reference you can open any default Magento email templates.

– Narendra Vyas
Mar 20 at 16:01





From wherever your email is been triggered after any action in controller you might be passing some variables just pass your email url also in email vars and consume them. For reference you can open any default Magento email templates.

– Narendra Vyas
Mar 20 at 16:01













Sir I also pass the url as well if you can see this code trans '%imgUrl' imgUrl=$imgUrl in above code that is URL which I firstly just print in <p> to check that URL is coming properly or not after that I tried this for <img> tag but at that place it is not working

– Asad Khan
Mar 20 at 16:06






Sir I also pass the url as well if you can see this code trans '%imgUrl' imgUrl=$imgUrl in above code that is URL which I firstly just print in <p> to check that URL is coming properly or not after that I tried this for <img> tag but at that place it is not working

– Asad Khan
Mar 20 at 16:06














Try src = " imgUrl"

– Narendra Vyas
Mar 20 at 16:11





Try src = " imgUrl"

– Narendra Vyas
Mar 20 at 16:11













Are you.trying from your local ? Make sure you don't have any issue in showing images in every email ?

– Narendra Vyas
Mar 20 at 16:13





Are you.trying from your local ? Make sure you don't have any issue in showing images in every email ?

– Narendra Vyas
Mar 20 at 16:13













Sir Actually firstly when I get the URL of the product then firstly I check it in phtml file for testing that is it getting the img of the product or not.. then its shows me the img perfectly after that I send the URL in the mail

– Asad Khan
Mar 20 at 16:15





Sir Actually firstly when I get the URL of the product then firstly I check it in phtml file for testing that is it getting the img of the product or not.. then its shows me the img perfectly after that I send the URL in the mail

– Asad Khan
Mar 20 at 16:15










0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266730%2fhow-to-show-image-in-custom-email-magento-2%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266730%2fhow-to-show-image-in-custom-email-magento-2%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Masuk log Menu navigasi

Identifying “long and narrow” polygons in with PostGISlength and width of polygonWhy postgis st_overlaps reports Qgis' “avoid intersections” generated polygon as overlapping with others?Adjusting polygons to boundary and filling holesDrawing polygons with fixed area?How to remove spikes in Polygons with PostGISDeleting sliver polygons after difference operation in QGIS?Snapping boundaries in PostGISSplit polygon into parts adding attributes based on underlying polygon in QGISSplitting overlap between polygons and assign to nearest polygon using PostGIS?Expanding polygons and clipping at midpoint?Removing Intersection of Buffers in Same Layers

Старые Смолеговицы Содержание История | География | Демография | Достопримечательности | Примечания | НавигацияHGЯOLHGЯOL41 206 832 01641 606 406 141Административно-территориальное деление Ленинградской области«Переписная оброчная книга Водской пятины 1500 года», С. 793«Карта Ингерманландии: Ивангорода, Яма, Копорья, Нотеборга», по материалам 1676 г.«Генеральная карта провинции Ингерманландии» Э. Белинга и А. Андерсина, 1704 г., составлена по материалам 1678 г.«Географический чертёж над Ижорскою землей со своими городами» Адриана Шонбека 1705 г.Новая и достоверная всей Ингерманландии ланткарта. Грав. А. Ростовцев. СПб., 1727 г.Топографическая карта Санкт-Петербургской губернии. 5-и верстка. Шуберт. 1834 г.Описание Санкт-Петербургской губернии по уездам и станамСпецкарта западной части России Ф. Ф. Шуберта. 1844 г.Алфавитный список селений по уездам и станам С.-Петербургской губернииСписки населённых мест Российской Империи, составленные и издаваемые центральным статистическим комитетом министерства внутренних дел. XXXVII. Санкт-Петербургская губерния. По состоянию на 1862 год. СПб. 1864. С. 203Материалы по статистике народного хозяйства в С.-Петербургской губернии. Вып. IX. Частновладельческое хозяйство в Ямбургском уезде. СПб, 1888, С. 146, С. 2, 7, 54Положение о гербе муниципального образования Курское сельское поселениеСправочник истории административно-территориального деления Ленинградской области.Топографическая карта Ленинградской области, квадрат О-35-23-В (Хотыницы), 1930 г.АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1933, С. 27, 198АрхивированоАдминистративно-экономический справочник по Ленинградской области. — Л., 1936, с. 219АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1966, с. 175АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1973, С. 180АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1990, ISBN 5-289-00612-5, С. 38АрхивированоАдминистративно-территориальное деление Ленинградской области. — СПб., 2007, с. 60АрхивированоКоряков Юрий База данных «Этно-языковой состав населённых пунктов России». Ленинградская область.Административно-территориальное деление Ленинградской области. — СПб, 1997, ISBN 5-86153-055-6, С. 41АрхивированоКультовый комплекс Старые Смолеговицы // Электронная энциклопедия ЭрмитажаПроблемы выявления, изучения и сохранения культовых комплексов с каменными крестами: по материалам работ 2016-2017 гг. в Ленинградской области