snipt

Ctrl+h for KB shortcuts

Bash

Batch resize images

mogrify -resize <800>x<600> <*.ext>
https://snipt.net/embed/c4359d642cf25d2916c53a6fec788423/
/raw/c4359d642cf25d2916c53a6fec788423/
c4359d642cf25d2916c53a6fec788423
bash
Bash
1
2019-06-17T08:18:44
True
False
False
/api/public/snipt/16273/
batch-resize-images
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>mogrify -resize &lt;800&gt;x&lt;600&gt; &lt;*.ext&gt; </span></pre></div> </td></tr></table>
image, resize

CSS

IMG Hover Opacity

1
2
3
a:hover img {
	opacity: .75;
}
https://snipt.net/embed/a0f787bc72f4ebb9469ed4ccb9c4c992/
/raw/a0f787bc72f4ebb9469ed4ccb9c4c992/
a0f787bc72f4ebb9469ed4ccb9c4c992
css
CSS
3
2019-06-16T09:02:43
True
False
False
/api/public/snipt/14605/
img-hover-opacity
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">a</span><span class="nd">:hover</span> <span class="nt">img</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">opacity</span><span class="o">:</span> <span class="o">.</span><span class="m">75</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, hover, image, img, opacity

HTML+PHP

Magicfields gen_image

1
2
3
4
5
<?php
       $title = get_the_title();
       $img_phpthumb = array ("w" => 189, "h" => 130, "zc" => 1);
       $img_htm = array("alt" => "event thumbnail", "class" => "left event-thumb", "title" => $title );
       echo gen_image('event_thumbnail',1,1,$img_phpthumb,$img_htm); ?>
https://snipt.net/embed/e34596e62262049290d50d8bb62b801a/
/raw/e34596e62262049290d50d8bb62b801a/
e34596e62262049290d50d8bb62b801a
html+php
HTML+PHP
5
2019-06-06T10:50:06
True
False
False
/api/public/snipt/14348/
magicfields-gen_image
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a> <span class="nv">$title</span> <span class="o">=</span> <span class="nx">get_the_title</span><span class="p">();</span> </span><span id="L-3"><a name="L-3"></a> <span class="nv">$img_phpthumb</span> <span class="o">=</span> <span class="k">array</span> <span class="p">(</span><span class="s2">&quot;w&quot;</span> <span class="o">=&gt;</span> <span class="mi">189</span><span class="p">,</span> <span class="s2">&quot;h&quot;</span> <span class="o">=&gt;</span> <span class="mi">130</span><span class="p">,</span> <span class="s2">&quot;zc&quot;</span> <span class="o">=&gt;</span> <span class="mi">1</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a> <span class="nv">$img_htm</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span><span class="s2">&quot;alt&quot;</span> <span class="o">=&gt;</span> <span class="s2">&quot;event thumbnail&quot;</span><span class="p">,</span> <span class="s2">&quot;class&quot;</span> <span class="o">=&gt;</span> <span class="s2">&quot;left event-thumb&quot;</span><span class="p">,</span> <span class="s2">&quot;title&quot;</span> <span class="o">=&gt;</span> <span class="nv">$title</span> <span class="p">);</span> </span><span id="L-5"><a name="L-5"></a> <span class="k">echo</span> <span class="nx">gen_image</span><span class="p">(</span><span class="s1">&#39;event_thumbnail&#39;</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="nv">$img_phpthumb</span><span class="p">,</span><span class="nv">$img_htm</span><span class="p">);</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
image, magicfields, wordpress