<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[image - All your code are belong to us]]></title><description><![CDATA[Thoughts, stories and ideas on code and technology in general.<br>Blog title inspired by <a href="https://en.wikipedia.org/wiki/All_your_base_are_belong_to_us" target="_blank">this meme</a>]]></description><link>https://allurcode.com/</link><image><url>https://allurcode.com/favicon.png</url><title>image - All your code are belong to us</title><link>https://allurcode.com/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Tue, 09 Jun 2026 09:57:20 GMT</lastBuildDate><atom:link href="https://allurcode.com/tag/image/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Prevent image hotlinking / stealing from your site with nginx]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Have you noticed other sites hotlinking to your images or other assets? Are they eating up your bandtwitch? Or you just want to proactively prevent that? If so, there&apos;s a very easy way to do so with a simple configuration on nginx.<br>
Open up nginx config file for</p>]]></description><link>https://allurcode.com/prevent-image-hotlinking-stealing-from-your-site-with-nginx/</link><guid isPermaLink="false">5d2217ad1e346910a0144eb4</guid><category><![CDATA[nginx]]></category><category><![CDATA[image]]></category><category><![CDATA[hotlink]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Sun, 07 Jul 2019 16:59:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Have you noticed other sites hotlinking to your images or other assets? Are they eating up your bandtwitch? Or you just want to proactively prevent that? If so, there&apos;s a very easy way to do so with a simple configuration on nginx.<br>
Open up nginx config file for your site and add another <code>location</code> block like this:</p>
<pre><code class="language-nginx">server {
    # your normal site configuration is here

    location ~* \.(gif|png|jpe?g)$ {
        valid_referers none blocked server_names ~\.google\. ~\.bing\. ~\.yahoo\. ~\.facebook\. ~\.yoursite.com;
        if ($invalid_referer) {
            return 403;
        }
    }
}
</code></pre>
<p>With above, we&apos;re sending <code>403 Forbidden error</code> status code whenver an image is requested from a referer that is not in our approved list.<br>
<code>valid_referers</code> lists sites which we want to allow hotlinking our images. Remember to change <code>~\.yoursite.com</code> to your actual site domain.<br>
If you want to block other file types, just add an extra pipe &quot;|&quot; and file extension, like this <code>(gif|png|jpe?g|bmp|tiff|pdf)</code></p>
<p>Going one step further, you can serve one specific image every time a not approved sites tries to hotlink to your assets. To do that add below config:</p>
<pre><code class="language-nginx">server {
    # your normal site configuration is here

    location ~* \.(gif|png|jpe?g)$ {
        valid_referers none blocked server_names ~\.google\. ~\.bing\. ~\.yahoo\. ~\.facebook\. ~\.yoursite.com;
        if ($invalid_referer) {
            rewrite (.*) /path/to/image/hotlinking-denied.jpg redirect;
        }
    }
    # prevent redirect loop
    location = /path/to/image/hotlinking-denied.jpg { }
}
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Gmail's recent email rendering change]]></title><description><![CDATA[<!--kg-card-begin: markdown--><h3 id="problem">Problem</h3>
<p>Gmail recently made a few changes in their email rendering engine. Unfortunately for us our image based HTML newsletters that used to look fine in gmail are now broken. Each image seems to have a weird spacing after it.<br>
If you&#x2019;ve been sending HTML newsletters for your</p>]]></description><link>https://allurcode.com/gmails-recent-email-rendering-change/</link><guid isPermaLink="false">5b7b0aa2b52b43084c9ea122</guid><category><![CDATA[CSS]]></category><category><![CDATA[email]]></category><category><![CDATA[gmail]]></category><category><![CDATA[Google]]></category><category><![CDATA[HTML]]></category><category><![CDATA[image]]></category><category><![CDATA[spacing]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Tue, 01 Jun 2010 10:14:28 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h3 id="problem">Problem</h3>
<p>Gmail recently made a few changes in their email rendering engine. Unfortunately for us our image based HTML newsletters that used to look fine in gmail are now broken. Each image seems to have a weird spacing after it.<br>
If you&#x2019;ve been sending HTML newsletters for your clients for some time now, you probably have your own email templates that work well in all email clients. Well not anymore thanks to Google.</p>
<h3 id="solution">Solution</h3>
<p>To make things back to what they were just add <code>style=&quot;display:block;&quot;</code> to every img tag in your HTML email and we&#x2019;re back in business.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[How ideas (don't) evolve]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Sad but true<br>
<img src="https://allurcode.com/content/images/2009/11/photopodborka_001.jpg" alt="Ideas" title="Ideas" loading="lazy"></p>
<!--kg-card-end: markdown-->]]></description><link>https://allurcode.com/how-ideas-dont-evolve/</link><guid isPermaLink="false">5b7b0aa2b52b43084c9ea118</guid><category><![CDATA[fun]]></category><category><![CDATA[image]]></category><dc:creator><![CDATA[Wojtek]]></dc:creator><pubDate>Thu, 19 Nov 2009 23:56:44 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Sad but true<br>
<img src="https://allurcode.com/content/images/2009/11/photopodborka_001.jpg" alt="Ideas" title="Ideas" loading="lazy"></p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>