<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>image url in css Archives - Cody Paste</title>
	<atom:link href="https://www.codypaste.com/tag/image-url-in-css/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codypaste.com/tag/image-url-in-css/</link>
	<description>THE WEB PLAYGROUND</description>
	<lastBuildDate>Tue, 13 Mar 2018 12:20:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.codypaste.com/wp-content/uploads/2022/12/cropped-codypaste-32x32.png</url>
	<title>image url in css Archives - Cody Paste</title>
	<link>https://www.codypaste.com/tag/image-url-in-css/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Add a static image on PHTML page and CMS Blocks : Magento2</title>
		<link>https://www.codypaste.com/add-a-static-image-on-phtml-page-and-cms-blocks-magento2/</link>
					<comments>https://www.codypaste.com/add-a-static-image-on-phtml-page-and-cms-blocks-magento2/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Tue, 27 Feb 2018 08:48:57 +0000</pubDate>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[image in magento]]></category>
		<category><![CDATA[image in phtml file]]></category>
		<category><![CDATA[image url in css]]></category>
		<category><![CDATA[image url in magento]]></category>
		<category><![CDATA[phtml image]]></category>
		<guid isPermaLink="false">http://www.codypaste.com/?p=661</guid>

					<description><![CDATA[<p>image url Syntax is ok for both static block and phtml, But make sure that when you write this code in static block [crayon-69be97f85108d009639041/] on front end it looks like http://localhost/magento2new/pub/static/frontend/Magento/luma/en_US/images/slide-bg.jpg Where Magento/luma is package name and theme name, you can replace with your package and theme name So you have to take care for slide-bg.jpg is exist in pub/static/frontend/Magento/luma/en_US/images directory. In your case, [crayon-69be97f8510ad095972647/] Syntax seems ok , but in &#8230; </p>
<p class="link-more"><a href="https://www.codypaste.com/add-a-static-image-on-phtml-page-and-cms-blocks-magento2/" class="more-link">read more<span class="screen-reader-text"> "Add a static image on PHTML page and CMS Blocks : Magento2"</span></a></p>
<p>The post <a href="https://www.codypaste.com/add-a-static-image-on-phtml-page-and-cms-blocks-magento2/">Add a static image on PHTML page and CMS Blocks : Magento2</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td class="votecell">
<div class="vote"></div>
</td>
<td class="answercell">
<div class="post-text">
<p>image url Syntax is ok for both <code>static block</code> and <code>phtml</code>, But make sure that when you write this code in static block</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;span class=&quot;tag&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;atn&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot;&gt;&quot;{{view url=&quot;&lt;/span&gt;&lt;span class=&quot;atn&quot;&gt;images&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;atn&quot;&gt;slide-bg&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;atn&quot;&gt;jpg&lt;/span&gt;&lt;span class=&quot;atv&quot;&gt;&quot;}}&quot;&lt;/span&gt; &lt;span class=&quot;atn&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot;&gt;&quot;test&quot;&lt;/span&gt; &lt;span class=&quot;tag&quot;&gt;/&amp;gt;&lt;/span&gt;</pre><p>on front end it looks like</p>
<p><a href="http://localhost/magento2new/pub/static/frontend/Magento/luma/en_US/images/slide-bg.jpg" rel="noreferrer">http://localhost/magento2new/pub/static/frontend/Magento/luma/en_US/images/slide-bg.jpg</a></p>
<p>Where <code>Magento/luma</code> is <code>package</code> name and <code>theme</code> name, you can replace with your <code>package</code> and <code>theme</code> name</p>
<p>So you have to take care for <code>slide-bg.jpg</code> is exist in</p>
<p><code>pub/static/frontend/Magento/luma/en_US/images</code> directory.</p>
<p><strong>In your case,</strong></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;span class=&quot;pln&quot;&gt;&amp;lt;img src='&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;php echo $this&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;getViewFileUrl&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;'images/footer-logo.png'&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;pun&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;' alt=&quot;Demo&quot;&amp;gt;&lt;/span&gt;</pre><p>Syntax seems ok , but in frontend It looks like</p>
<p><a href="http://localhost/magento2new/pub/static/frontend/Magento/luma/en_US/images/footer-logo.png" rel="noreferrer">http://localhost/magento2new/pub/static/frontend/Magento/luma/en_US/images/footer-logo.png</a></p>
<p>So you have to make sure that <code>footer-logo.png</code> exist in</p>
<p><code>pub/static/frontend/Magento/luma/en_US/images</code> directory.</p>
<p>And don&#8217;t forgot about <strong><code>"[quotation marks]</code></strong></p>
<p><strong>In CSS:</strong></p>
<p><code>background: url('{{view url="images/menu-button-of-three-lines.svg"}}');</code></p>
</div>
</td>
</tr>
</tbody>
</table>
<p>The post <a href="https://www.codypaste.com/add-a-static-image-on-phtml-page-and-cms-blocks-magento2/">Add a static image on PHTML page and CMS Blocks : Magento2</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/add-a-static-image-on-phtml-page-and-cms-blocks-magento2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
