<?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>Images Archives - FODINA 4 FOSS</title>
	<atom:link href="https://fodina.de/tag/images/feed/" rel="self" type="application/rss+xml" />
	<link>https://fodina.de/tag/images/</link>
	<description>a treasure trove for free software, techniques, and ideas</description>
	<lastBuildDate>Fri, 11 Aug 2023 18:56:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>bootScore Without Blurred ‘Featured Images’</title>
		<link>https://fodina.de/without-any-blurred-images/</link>
					<comments>https://fodina.de/without-any-blurred-images/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Mon, 13 Mar 2023 18:25:46 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bootScore]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5821</guid>

					<description><![CDATA[<p>I have already discussed bootScores blurred images. The problem was easy: In cooperation with WordPress, bootScore embeds images of size ‘medium’ in the post lists. And that even on large screens, where the browsers have to fill much more space than the images could do by themselves. Consequently, the browsers upsize the images that are [&#8230;]</p>
<p>The post <a href="https://fodina.de/without-any-blurred-images/">bootScore Without Blurred ‘Featured Images’</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I have already discussed <a href="https://fodina.de/larger-image-squares/"><em>bootScore</em>s blurred images</a>. The problem was easy: <a href="https://fodina.de/less-blurred-images/">In cooperation with WordPress,  bootScore embeds images of size ‘medium’ in the post lists</a>. And that even on large screens, where the browsers have to fill much more space than the images could do by themselves. Consequently, the browsers upsize the images that are too small — and blur them. Or, put another way: <em>bootScore</em> offers an excellent ‘Responsive Design’ when it comes to the texts. When it comes to the images, not (yet). Here, we offer a way towards bootScore without blurred Featured Images — with the help of HTML‑5:<span id="more-5823"></span></p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/ganz-ohne-verwischte-bilder">de</a> ]</div></div></div></div>



<p>This time, let me start with the summary before I describe the solutions step by step:</p>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>


<div class="wp-block-image"><figure class="alignleft size-medium is-resized is-style-default "><a href="https://fodina.de/wp-content/uploads/2023/05/bsPictureProblemA.png" data-fancybox><img decoding="async" src="https://fodina.de/wp-content/uploads/2023/05/bsPictureProblemA-300x208.png" alt="blurred image problem 1" width="120"></a></figure></div>



<p>During the past months, I had set up two demos.  On an almost pure WordPress 6.1<sup><a href="https://fodina.de/without-any-blurred-images/#footnote_0_5823" id="identifier_0_5823" class="footnote-link footnote-identifier-link" title="as an additional extension I only needed Better Search Replace">1</a></sup> and a pure <em>bootScore</em><sup><a href="https://fodina.de/without-any-blurred-images/#footnote_1_5823" id="identifier_1_5823" class="footnote-link footnote-identifier-link" title="I uploaded and assigned the 'Featured Images' in the size 1280*720">2</a></sup>. Now, I’ve saved the respective screenshots. The left presents the post list with featured images, as the index.php of an unmodified bootScore generates it. The right presents the post list as generated by archive-masonry.php<sup><a href="https://fodina.de/without-any-blurred-images/#footnote_2_5823" id="identifier_2_5823" class="footnote-link footnote-identifier-link" title="with an aligned area <header>..</header>">3</a></sup> from the <a href="https://bootscore.me/#download">template package</a> of an otherwise unmodified <em>bootScore</em>.</p>


<div class="wp-block-image"><figure class="alignright size-medium is-resized is-style-default "><a href="https://fodina.de/wp-content/uploads/2023/05/bsPictureProblemB.png" data-fancybox><img decoding="async" src="https://fodina.de/wp-content/uploads/2023/05/bsPictureProblemB-300x196.png" alt="blurred image problem 2" width="120"></a></figure></div>



<p>In both cases, the blurring effect arises on large screens. In the right picture, it is a bit weaker because the difference between the space provided and the size of the embedded image is smaller. Then I offered two solutions, a traditional and an advanced<sup><a href="https://fodina.de/without-any-blurred-images/#footnote_3_5823" id="identifier_3_5823" class="footnote-link footnote-identifier-link" title="implemented by respecting the same constraints">4</a></sup>:</p>



<ul class="wp-block-list">
<li>The traditional solution lets WordPress generate an additional thumbnail when uploading, whose width of 560px is between the default sizes ‘medium’ and ‘large’.<sup><a href="https://fodina.de/without-any-blurred-images/#footnote_4_5823" id="identifier_4_5823" class="footnote-link footnote-identifier-link" title="So far, I had recommended 600x600. Now after some discussion, some reading up, and extensive testing I think a 16:9 image with a width of 560px is sufficient.">5</a></sup> Additionally, this solution no longer makes the templates ask for the size ‘medium’, but for the self-defined size <em>bsTeaser</em>.</li>



<li>The advanced solution uses the features of the tag <code>&lt;img&gt;</code>, as they were enabled under HTML‑5. By that, the pages tell the displaying browsers which images are available and up to what space they should use which one. But eventually, the browser chooses the right one on the base of this information.</li>
</ul>



<p>The point is this:</p>


<div class="wp-block-image"><figure class="alignright size-medium is-resized is-style-default "><a href="https://fodina.de/wp-content/uploads/2023/05/bsPictureProblemSolution2.png" data-fancybox><img decoding="async" src="https://fodina.de/wp-content/uploads/2023/05/bsPictureProblemSolution2-300x208.png" alt="blurred image solution" width="120"></a></figure></div>



<ul class="wp-block-list">
<li>In the traditional solution, we — the site editors — still statically decide which image the browser shall embed into the space — even though we don’t know its actual size (responsive design).</li>



<li>In the advanced solution, the browser decides, because it knows the size of the actually available, ‘Responsive Design’-conditioned space. And it can decide that because we have told, which images are available with which dimensions.</li>
</ul>



<div style="height:13px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solutions</h2>



<ul class="wp-block-list">
<li>For solutions 1 and 2 insert the line <code>add_image_size('bsTeaser', 560, 0, false );</code> into your <code>functions.php</code>:</li>



<li>For solution 1, replace <code>get_the_post_thumbnail(null, 'medium')</code> with <code>get_the_post_thumbnail(null, 'bsTeaser')</code> in all templates relevant to you.</li>



<li>For solution 2 insert the following lines to your <code>functions.php</code>:</li>
</ul>



<pre class="wp-block-code"><code>/*
 * Applay the better html-5 based image tag structure (with srcset and sizes) 
 * (C) 2023 Karsten Reincke
 * SPDX-License-Identifier: MIT
 *
 * Created in accordance with 
 * a) https://developer.wordpress.org/reference/functions/wp_get_attachment_image_src/
 * b) https://straightvisions.com/en/news/howtos-en/gutenberg-and-responsive-image-sizes/
 */
function html5ThumbnailHtml($html, $post_id, $post_thumbnail_id, $size, $attr) {
  $id = get_post_thumbnail_id($post_id); // gets the id of the current post_thumbnail (in the loop)

  $columnSize=", 400px"; 
  if (is_single($post_id)) $columnSize=""; // take the complete screen for visualization  

  $smSrc="";
  $smSize="";
  $mdSrc="";
  $mdSize="";
  $lgSrc="";
  $lgSize="";
  $flSrc="";
  $flSize="";
  $bsSrc="";
  $bsSize="";
  $defImg=null; 

  $smImage=(array) wp_get_attachment_image_src($id, 'thumbnail');
  if ($smImage!=null) {
    $smSrc=$smImage[0] .' '. $smImage[1] .'w';
    $smSize='(max-width: ' . $smImage[1] . 'px) ' . $smImage[1] .'px';
  }

  $mdImage=(array) wp_get_attachment_image_src($id, 'medium');
  if ($mdImage!=null) {
    $mdSrc=$mdImage[0] . ' ' . $mdImage[1] .'w';
    $mdSize='(max-width: ' . $mdImage[1] . 'px) ' . $mdImage[1] .'px';
  }

  $bsImage=(array) wp_get_attachment_image_src($id, 'bsTeaser');
  if ($bsImage!=null) {
    $bsSrc=$bsImage[0] . ' ' . $bsImage[1] .'w';
    $bsSize='(max-width: ' . $bsImage[1] . 'px) ' . $bsImage[1] .'px';
  }

  $lgImage=(array) wp_get_attachment_image_src($id, 'large');
  if ($lgImage!=null) {
    /*
     * There seems to be a bug in wp_get_attachment_image_src($id, 'large'):
     * the function returns a wrong width (640): Solution: hardcode
     * values in accordance with the definition under settings
     */
    $lgSrc=$lgImage[0] . ' ' . '1024w';
    $lgSize='(max-width: ' . '1024px) '  .'1024px';
    $defImg=$lgImage[0];
    //$lgSrc=$lgImage[0] . ' ' . $lgImage[1] .'w';
    //$lgSize='(max-width: ' . $lgImage[1] . 'px) ' . $lgImage[1] .'px';
  }

  $flImage=(array) wp_get_attachment_image_src($id, 'full');
  if ($flImage!=null) {
    $flSrc=$flImage[0] . ' ' . $flImage[1] .'w';
    $flSize='(max-width: ' . $flImage[1] . 'px) ' . $flImage[1] .'px';
    if(!($defImg)) $defImg=$flImage[0];
  }

  $srcSet="";
  $sizeSet="";
  if ($smSrc) {
    $sep=' ';
    if ( ( ($mdSrc)||($bsSrc) )||( ($lgSrc)||($flSrc) ) ) $sep = ', ';
    $srcSet=$smSrc . $sep;
    $sizeSet=$smSize . $sep;
  }

  if ($mdSrc) {
    $sep=' ';
    if ( ($bsSrc)||( ($lgSrc)||($flSrc) ) ) $sep = ', ';
    $srcSet=$srcSet . $mdSrc . $sep;
    $sizeSet=$sizeSet . $mdSize . $sep;
  }

  if ($bsSrc) {
    $sep=' ';
    if ( ($lgSrc)||($flSrc) ) $sep = ', ';
    $srcSet=$srcSet . $bsSrc . $sep;
    $sizeSet=$sizeSet . $bsSize . $sep;
  }

  if ($lgSrc) {
    $sep=' ';
    if ($flSrc) $sep = ', ';
    $srcSet=$srcSet . $lgSrc . $sep;
    $sizeSet=$sizeSet . $lgSize . $sep;
  }
  if ($flSrc) {
    $srcSet=$srcSet . $flSrc;
    $sizeSet=$sizeSet . $flSize;
  }
  $alt=get_post_meta($id, '_wp_attachment_image_alt', TRUE);
  $class = $attr['class']; // gets classes passed to the post thumbnail, defined here for easier function access

  $html = '&lt;img src="' . $defImg . '" ' . 
         'alt="' . $alt . '" ' . 
         'srcSet="' . $srcSet . '" ' .
         'sizes="' . $sizeSet . ' ' . $columnSize .'" ' .
         'class="' . $class . '" /&gt;';
  return $html;
}
add_filter('post_thumbnail_html', 'html5ThumbnailHtml', 99, 5);</code></pre>



<p>You may read the code like this:</p>



<ul class="wp-block-list">
<li>First, the algorithm fetches the <em>id </em>of the ‘Featured Image’ and sets the approximate width of a column, the browser shall use if the window is larger than the width of the largest image.</li>



<li>Then, the algorithm requests the sizes of all defined images and computes the values <em>Image-path-width</em> and <em>Image-width Responsible-for-place-width</em>.</li>



<li>Finally, the list of available images and the list of which image width is responsible for which space width are created from this.</li>



<li>And finally, this is converted as an <code>img</code> tag with <code>srcSet</code> and <code>size</code> list.</li>
</ul>



<p>So for the <code>feature image</code> used in this article, the following line is sent to the browser:</p>



<p>On this basis, the browser itself decides which image to fit where and when. That’s the method for using <em>Responsive <strong>Images</strong></em> in a <em>Responsive Design</em>.</p>



<p>Of course, I didn’t come up with this or put it from theory into practice myself. I essentially follow three sources:</p>



<ul class="wp-block-list">
<li><a href="https://webdesign.tutsplus.com/tutorials/quick-tip-how-to-use-html5-picture-for-responsive-images--cms-21015">webdesign tutsplus: html5 pictures for responsive images</a></li>



<li><a href="https://straightvisions.com/en/news/howtos-en/gutenberg-and-responsive-image-sizes/">straightvisions: gutenberg and responsive image-sizes</a></li>



<li><a href="https://developer.wordpress.org/reference/functions/wp_get_attachment_image_src/">developer.wordpress.org: wp_get_attachment_image_src</a></li>
</ul>


<hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-road"></i> And how does this …</h5>
  <p class="myPageContext">… support our 
  <a href="/bootscore-migration/">migration</a> to 
  <a href="https://bootscore.me/">bootScore</a>? Well,
  once started with <a href="/pimp-your-bootscore/">improving</a> the
  <a href="/speed-up-images">image handling</a>, a web designer will 
  also notice the <a href="/blurred-featured-images/">blurred ‘featured images’</a> 
  of bootScore. She will <a href="/larger-image-squares/">try</a> and 
  <a href="/less-blurred-images/">refine</a> solutions. And she may also tackle them 
  <a href="/without-any-blurred-images/">with new HTML‑5 techniques</a>. Because with 
  that, <a href="/image-databases/">a fancier image strategy</a> combined 
  with <a href="/picture-credit-page/">an integrated license fulfillment process</a>
  and its own <a href="/logos-and-favicons/">logo</a> will really make sense.
  However, pictures bring colors to reading. So they should be integrated into 
  <a href="}/color-concept">a customized color concept</a>. 
  This post also contributes something to this topic.
  </p><hr class="wp-block-separator has-alpha-channel-opacity">

<ol class="footnotes"><li id="footnote_0_5823" class="footnote">as an additional extension I only needed <em>Better Search Replace</em></li><li id="footnote_1_5823" class="footnote">I uploaded and assigned the ‘Featured Images’ in the size 1280*720</li><li id="footnote_2_5823" class="footnote">with an aligned area <code>&lt;header&gt;..&lt;/header&gt;</code> </li><li id="footnote_3_5823" class="footnote">implemented by respecting the same constraints</li><li id="footnote_4_5823" class="footnote">So far, I had recommended 600x600. Now after some discussion, some reading up, and extensive testing I think a 16:9 image with a width of 560px is sufficient.</li></ol><p>The post <a href="https://fodina.de/without-any-blurred-images/">bootScore Without Blurred ‘Featured Images’</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/without-any-blurred-images/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Topic Clouds &#038; Post Lists: 2 On 1 Stroke!!</title>
		<link>https://fodina.de/two-on-one-stroke/</link>
					<comments>https://fodina.de/two-on-one-stroke/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Mon, 06 Mar 2023 17:13:31 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bootScore]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5699</guid>

					<description><![CDATA[<p>There were two things I wanted to see changed in the bootScore theme before venturing into the big interventions. I was told that improved topic clouds and post lists would increase readability and usability. Fortunately, it was easy to get a more fancy tag cloud and an improved list of recent posts showing the featured [&#8230;]</p>
<p>The post <a href="https://fodina.de/two-on-one-stroke/">Topic Clouds &amp; Post Lists: 2 On 1 Stroke!!</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>There were two things I wanted to see changed in the bootScore theme before venturing into the big interventions. I was told that improved topic clouds and post lists would increase <a href="https://fodina.de/hyphenation/">readability</a> and <a href="https://fodina.de/menu-stack/">usability</a>. Fortunately, it was easy to get a more fancy tag cloud and an improved list of recent posts showing the featured images as thumbnails:<span id="more-5699"></span></p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/zwei-auf-einen-streich">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solution</h2>



<ul class="wp-block-list">
<li>For getting a nicer tag cloud
<ul class="wp-block-list">
<li>install the Plugin <a href="https://de.wordpress.org/plugins/cool-tag-cloud/">Cool Tag Cloud</a>,</li>



<li>goto <code>Appereance/Widgets</code>,</li>



<li>copy the widget <code>Cool Tag Cloud</code> into the sidebar,</li>



<li>open it to configure it,</li>



<li>set the value <code>Largest Font</code> to 17 (so that the tags denoting more posts are displayed larger),</li>



<li>select an image color fitting the style of your theme,</li>



<li>and: Bingo.</li>
</ul>
</li>



<li>For getting a nicer <em>recent post list</em>
<ul class="wp-block-list">
<li>install the plugin [Recent Posts Widget Extended] https://de.wordpress.org/plugins/recent-posts-widget-extended/,</li>



<li>goto <code>Appereance/Widgets</code>,</li>



<li>replace the standard widget <em>recent-post-widget</em> in the sidebar with the new <em>recent-post-widget extended</em>,</li>



<li>and again: Bingo</li>
</ul>
</li>
</ul>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>



<p><a href="https://de.wordpress.org/plugins/">WordPress</a> offers <a href="https://wordpress.org/plugins/search/tag+cloud/">some plugins for improving the tag cloud</a>. Its own widget is a little spartan. But most of the alternatives are somehow outdated<sup><a href="https://fodina.de/two-on-one-stroke/#footnote_0_5699" id="identifier_0_5699" class="footnote-link footnote-identifier-link" title="= not tested with my current version 6.1.1">1</a></sup> or try to offer complete tag management. Thus, for the moment<sup><a href="https://fodina.de/two-on-one-stroke/#footnote_1_5699" id="identifier_1_5699" class="footnote-link footnote-identifier-link" title="2023.3.6">2</a></sup> I could only find two candidates: Cool Tag Cloud and Creative Tag Cloud. The latter produces a very stylish spiral. But it is difficult to configure. And the result does not properly work on small devices. Quite different in contrast: Cool Tag Cloud. On its description page, it pretends to be Open-Source Software. But the repository neither contains a license file nor a licensing statement. So — as a FOSS purist — I should ignore it, which I do not do because it is officially hosted as a WordPress plugin and <a href="https://wordpress.org/about/license/">WordPress is licensed under the GPL‑2.0</a>. In other words: I am counting on the Copy-Left Effect.</p>



<p>WordPress delivers its own recent post widget as well as it contains its own tag cloud widget. And the recent post widget also produces a visually rather limited result. For its improvement, I bet on the plugin <em><a href="https://de.wordpress.org/plugins/recent-posts-widget-extended/">recent post widget extended</a></em>. According to its readme.txt, it is licensed under <em>GPL-v3 or later</em>. And eventually, it directly does what I wanted that it should do.</p>


<hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-road"></i> And how does this …</h5>
  <p class="myPageContext">… support our 
  <a href="http://fodina.de/bootscore-migration/">migration</a> to 
  <a href="https://bootscore.me/">bootScore</a>? Well,
  when the web designer has completed her <a href="http://fodina.de/pimp-your-bootscore/">work</a>
  on <a href="http://fodina.de/without-any-blurred-images/">good illustrations</a>, 
  she can relax and integrate <a href="http://fodina.de/two-on-one-stroke/">tags and clouds</a> 
  into her site, <a href="http://fodina.de/masonry-with-three-colums/">improve</a> 
  her <a href="http://fodina.de/masonry-survey/">overview page</a> 
  and design <a href="http://fodina.de/an-own-landingpage/">her own landing page</a>. 
  Whether the <a href="http://fodina.de/away-what-distracts/">resulting fullness</a> 
  really benefits her own reader, 
  whether it can  <a href="http://fodina.de/a-leaner-landing-page/">become slimmer</a> 
  and <a href="http://fodina.de/context-sensitive-sidebars/">how</a>, 
  whether more <a href="http://fodina.de/understated-post-links/">discreet references</a> 
  and <a href="http://fodina.de/fonts-for-special-occasions/">specific</a> 
  <a href="http://fodina.de/suitable-web-fonts/">fonts</a> 
  also increase the readability, 
  all this she should nevertheless consider while implementing these features. This post supports 
  these steps towards a personalized bootScore site.
  </p><hr class="wp-block-separator has-alpha-channel-opacity">

<ol class="footnotes"><li id="footnote_0_5699" class="footnote">= not tested with my current version 6.1.1</li><li id="footnote_1_5699" class="footnote">2023.3.6</li></ol><p>The post <a href="https://fodina.de/two-on-one-stroke/">Topic Clouds &amp; Post Lists: 2 On 1 Stroke!!</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/two-on-one-stroke/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Less Blurred Featured Images</title>
		<link>https://fodina.de/less-blurred-images/</link>
					<comments>https://fodina.de/less-blurred-images/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Sun, 05 Mar 2023 20:17:52 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bootScore]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5683</guid>

					<description><![CDATA[<p>To get less blurred featured images, I suggested enforcing WordPress to automatically generate also square bootScore-specific thumbnails of size 600x600. The bootScore templates index.php and archive.php should request these images via the command get_the_post_thumbnail(null, 'bsTeaser') instead of asking for the medium size. This would make it less likely that a picture would need to be [&#8230;]</p>
<p>The post <a href="https://fodina.de/less-blurred-images/">Less Blurred Featured Images</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>To get <a href="https://fodina.de/larger-image-squares/">less blurred featured images</a>, I suggested enforcing WordPress to automatically generate also square <em>bootScore</em>-specific thumbnails of size 600x600. The <em>bootScore</em> templates index.php and archive.php should request these images via the command <code>get_the_post_thumbnail(null, 'bsTeaser')</code> instead of asking for the medium size. This would make it less likely that a picture would need to be upsized.<span id="more-5683"></span></p>



<p>For large screens, <em>bootStrap</em> itself offers only a ‘solution’, that distorts 100% of all images: It queries WordPress for <em>medium</em> images<sup><a href="https://fodina.de/less-blurred-images/#footnote_0_5683" id="identifier_0_5683" class="footnote-link footnote-identifier-link" title="of size 300x?? - the question marks stand for the value that preserves the original aspect ratio at a width of 300">1</a></sup> and lets the browser fit them into a square space. But the generated thumbnails of size <em>medium</em> preserve the aspect ratio of the original. So, the browser displays rectangular images as squares. The distortion is guaranteed.</p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/weniger-verwischte-bilder">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Discussion</h2>



<p>I also offered my way to the <em>bootScore</em> team, via a <a href="https://github.com/bootscore/bootscore/pull/414">pull request</a> and a <a href="https://github.com/bootscore/bootscore/discussions/415">detailed justification</a>. The responses were interesting. The consensus was that handling images in general — and in particular, cleaning up this unsightly detail — shall be the job for the programming bootScore user. However, including larger thumbnails — as I suggested — would also apply to smartphones, degrade their performance, and thus degrade their SEO.</p>



<p>The SEO hint is certainly correct. That’s why I hadn’t suggested using the large size. But what I still don’t understand is why such a valuable work like <em>bootScore</em> looks worse than it should at a first practical glance. Yes, if you — with the original <em>bootScore</em> <code>index.php</code> — go through the possible cases with a <a href="https://chrome.google.com/webstore/detail/mobile-simulator-responsi/ckejmhbmlajgoklhgbapkiccekfoccmk/related">Mobile Simulator</a>, it shows a consistently good appearance. But just not on a desktop screen of the size 2560x1440. There, the browser renders the medium-sized image ‘300x169’ into a square provided by <em>bootScore</em> — with horrible results.<sup><a href="https://fodina.de/less-blurred-images/#footnote_1_5683" id="identifier_1_5683" class="footnote-link footnote-identifier-link" title="And in accordance with Murphy, our customer will be viewing her site on just such a device.">2</a></sup> And as the devil would have it: <em>bootScore</em> itself demonstrates this ugly effect — by its <a href="https://bootscore.me/blog/theme-blog/" class="broken_link">5.2.3.1 announcement</a></p>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Consequences</h2>



<p>Thus, we <em>bootScore</em> users have to think and rework carefully, especially with the ‘Featured Images’. One solution I have pointed out. The <em>bootScore</em> team has shown me another way: I should simply activate a template from <a href="https://github.com/bootscore/bs-loop-templates">https://github.com/bootscore/bs-loop-templates</a> as my new <code>home.php</code>, which does not convert to a square, like <a href="https://bootscore.me/archives/equal-height-sidebar-right/" class="broken_link">https://bootscore.me/archives/equal-height-sidebar-right/</a>.<sup><a href="https://fodina.de/less-blurred-images/#footnote_2_5683" id="identifier_2_5683" class="footnote-link footnote-identifier-link" title="The template alternatives are provided in the bootScore download section">3</a></sup></p>



<p>And what can I say: This looks good. It will look even better when I will have changed the now inappropriate titles in the template <i class=" fa-regular fa-face-smile-wink"></i>. And the template <a href="https://bootscore.me/archives/masonry/" class="broken_link">https://bootscore.me/archives/masonry/</a> would look really great, if — yes, if this one existed with a sidebar and if I switched in that template from <code>the_excerpt()</code> to <code>the_content()</code>.</p>


<hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-road"></i> And how does this …</h5>
  <p class="myPageContext">… support our 
  <a href="/bootscore-migration/">migration</a> to 
  <a href="https://bootscore.me/">bootScore</a>? Well,
  once started with <a href="/pimp-your-bootscore/">improving</a> the
  <a href="/speed-up-images">image handling</a>, a web designer will 
  also notice the <a href="/blurred-featured-images/">blurred ‘featured images’</a> 
  of bootScore. She will <a href="/larger-image-squares/">try</a> and 
  <a href="/less-blurred-images/">refine</a> solutions. And she may also tackle them 
  <a href="/without-any-blurred-images/">with new HTML‑5 techniques</a>. Because with 
  that, <a href="/image-databases/">a fancier image strategy</a> combined 
  with <a href="/picture-credit-page/">an integrated license fulfillment process</a>
  and its own <a href="/logos-and-favicons/">logo</a> will really make sense.
  However, pictures bring colors to reading. So they should be integrated into 
  <a href="}/color-concept">a customized color concept</a>. 
  This post also contributes something to this topic.
  </p><hr class="wp-block-separator has-alpha-channel-opacity">

<ol class="footnotes"><li id="footnote_0_5683" class="footnote">of size 300x?? — the question marks stand for the value that preserves the original aspect ratio at a width of 300</li><li id="footnote_1_5683" class="footnote">And in accordance with Murphy, our customer will be viewing her site on just such a device.</li><li id="footnote_2_5683" class="footnote">The template alternatives are provided in the <a href="https://bootscore.me/#download].">bootScore download section</a></li></ol><p>The post <a href="https://fodina.de/less-blurred-images/">Less Blurred Featured Images</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/less-blurred-images/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Your Own Logo and Favicons — bootScore Helps!</title>
		<link>https://fodina.de/logos-and-favicons/</link>
					<comments>https://fodina.de/logos-and-favicons/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Sat, 04 Mar 2023 17:04:58 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bootScore]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5673</guid>

					<description><![CDATA[<p>No website without pictures or logos! But integrating a logo correctly is often a tricky task. They have to be visible, well-placed, and leave space for the menu. Additionally, they must not bloat or distort the header area. And the way of integrating them into the templates should also allow us to use the favicons [&#8230;]</p>
<p>The post <a href="https://fodina.de/logos-and-favicons/">Your Own Logo and Favicons — bootScore Helps!</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>No website without <a href="https://fodina.de/image-databases/">pictures</a> or logos! But integrating a logo correctly is often a tricky task. They have to be visible, well-placed, and leave space for the menu. Additionally, they must not bloat or distort the header area. And the way of integrating them into the templates should also allow us to use the favicons for the browser tabs etc. This is where the <em>bootScore</em> developers took a lot of the work out of our hands! Once our logos roughly fit the intended dimensions, we essentially need to follow the <a href="https://bootscore.me/documentation/header-php/">bootScore instructions</a>. And by that, we get a logo and the respective favicons.<span id="more-5673"></span></p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/logos-und-favicons">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solution</h2>



<ul class="wp-block-list">
<li>Create your own regular logo, preferably as an SVG.</li>



<li>Create your own smaller logo, preferably as SVG.</li>



<li>Copy your regular logo to <code>bootscore-child/img/logo/logo.svg</code>.</li>



<li>Copy your smaller logo to <code>bootscore-child/img/logo/log-sm.svg</code>.</li>



<li>Also, follow the instructions to create the respective [favicons](https://bootscore.me/documentation/header-php/</li>
</ul>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>



<p>The logos are displayed by the <code>nav</code> area of the file <code>header.php</code> and are held in a container, which also has to manage the menu etc. The respective <code>img</code> tags used in it do not specify any heights or widths. Thus, the icons are displayed in the dimensions they were designed with. This is also true for SVG images. So: the higher the generated logo, the higher the NAV area; the longer the logo, the more the following elements are shifted to the right.</p>



<p>This is not a disadvantage, but a lean solution. After all, logos that are displayed on every page are welcome to be more discreet. The reader will also notice smaller versions. I, at least, have had good experiences with the following values:</p>



<ul class="wp-block-list">
<li>132x27 pixel and 76x27 pixel (bootScore logo.svg and logo-sm.svg)</li>



<li>131x46 pixel and 48x56 pixel (logo fodina.de)</li>



<li>102x57 pixel and 54x54 pixel (logos karsten-reincke.de)</li>
</ul>



<p>After creating the favicons, the user should — according to the <a href="https://bootscore.me/documentation/header-php/">header.php-Docu</a> — adopt certain values. The specified line numbers refer to the file <code>header.php</code> as it has initially been supplied by <em>bootScore</em>, not to the generated favicons: Of the files created by the <a href="nethttps://realfavicongenerator.net/">realfavicongenerator</a>, only the file <code>site.webmanifest</code> shall be modified by removing the preceding slashes of the absolute paths.</p>



<p>To perform the recommended <em>favicon check</em>, the generated files must be imported into a (pre) production system so that the URL of the site can be handed over to the <a href="https://realfavicongenerator.net/favicon_checker">https://realfavicongenerator.net/favicon_checker</a>. Currently<sup><a href="https://fodina.de/logos-and-favicons/#footnote_0_5673" id="identifier_0_5673" class="footnote-link footnote-identifier-link" title="as of 03/03/2013">1</a></sup>, this check discovers errors related to the files generated by the <em>realfavicongenerator</em> itself: well, a bit astonishing, isn’t it?</p>


<hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-road"></i> And how does this …</h5>
  <p class="myPageContext">… support our 
  <a href="/bootscore-migration/">migration</a> to 
  <a href="https://bootscore.me/">bootScore</a>? Well,
  once started with <a href="/pimp-your-bootscore/">improving</a> the
  <a href="/speed-up-images">image handling</a>, a web designer will 
  also notice the <a href="/blurred-featured-images/">blurred ‘featured images’</a> 
  of bootScore. She will <a href="/larger-image-squares/">try</a> and 
  <a href="/less-blurred-images/">refine</a> solutions. And she may also tackle them 
  <a href="/without-any-blurred-images/">with new HTML‑5 techniques</a>. Because with 
  that, <a href="/image-databases/">a fancier image strategy</a> combined 
  with <a href="/picture-credit-page/">an integrated license fulfillment process</a>
  and its own <a href="/logos-and-favicons/">logo</a> will really make sense.
  However, pictures bring colors to reading. So they should be integrated into 
  <a href="}/color-concept">a customized color concept</a>. 
  This post also contributes something to this topic.
  </p><hr class="wp-block-separator has-alpha-channel-opacity">

<ol class="footnotes"><li id="footnote_0_5673" class="footnote">as of 03/03/2013</li></ol><p>The post <a href="https://fodina.de/logos-and-favicons/">Your Own Logo and Favicons — bootScore Helps!</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/logos-and-favicons/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting Nice Pictures — Where From, If Not Steal?</title>
		<link>https://fodina.de/image-databases/</link>
					<comments>https://fodina.de/image-databases/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Thu, 02 Mar 2023 22:18:31 +0000</pubDate>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Licensing]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5636</guid>

					<description><![CDATA[<p>I love ZEN presentations. For that, you need pictures. Many pictures. Good pictures. Fortunately, it is technically easy to integrate photos from the internet into your own site. What is challenging, however, is getting nice pictures legally. Solution Background Images, photos, and logos are also subject to copyright law. Often also of the trademark law. [&#8230;]</p>
<p>The post <a href="https://fodina.de/image-databases/">Getting Nice Pictures — Where From, If Not Steal?</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I love ZEN presentations. For that, you need pictures. Many pictures. Good pictures. Fortunately, it is technically easy to <a href="https://fodina.de/blurred-featured-images/">integrate photos from the internet</a> into your own site. What is challenging, however, is getting nice pictures <a href="https://fodina.de/cc-by-trolls/">legally</a>.<span id="more-5636"></span></p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/bilder-datenbanken">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solution</h2>



<ul class="wp-block-list">
<li>First, use image databases whose pictures are released under the terms of the <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 license</a>.<sup><a href="https://fodina.de/image-databases/#footnote_0_5636" id="identifier_0_5636" class="footnote-link footnote-identifier-link" title="We're allowed to use those for no consideration, after all.">1</a></sup> E.g. <a href="https://pxhere.com/">pxhere</a><sup><a href="https://fodina.de/image-databases/#footnote_1_5636" id="identifier_1_5636" class="footnote-link footnote-identifier-link" title="for licensing see https://pxhere.com/en/license">2</a></sup> or <a href="https://openclipart.org/">openclipart</a>.<sup><a href="https://fodina.de/image-databases/#footnote_2_5636" id="identifier_2_5636" class="footnote-link footnote-identifier-link" title="for licensing cf. https://openclipart.org/faq">3</a></sup></li>



<li>Then evaluate image databases whose pictures have been published under any different Creative Commons license. E.g. <a href="https://commons.wikimedia.org/">Wikimedia</a><sup><a href="https://fodina.de/image-databases/#footnote_3_5636" id="identifier_3_5636" class="footnote-link footnote-identifier-link" title="for licensing cf. https://commons.wikimedia.org/wiki/Commons:Licensing/de">4</a></sup>, <a href="https://www.flickr.com/creativecommons/">flicker.com/creativecommons</a> or <a href="https://www.piqs.de/">piqs.de</a></li>



<li>But avoid images that are licensed under a CC-??-NC-??<sup><a href="https://fodina.de/image-databases/#footnote_4_5636" id="identifier_4_5636" class="footnote-link footnote-identifier-link" title="for the layer model of CC licenses, see https://creativecommons.org/licenses/">5</a></sup> license.<sup><a href="https://fodina.de/image-databases/#footnote_5_5636" id="identifier_5_5636" class="footnote-link footnote-identifier-link" title="Because legally even the simplest blog can still be interpreted as a commercial enterprise.">6</a></sup></li>



<li>And meticulously fulfill the other conditions, such as attribution. A good place to do that is a page with image credits.</li>



<li>Finally, be careful if you use an image database that distributes its images under its own license, which is equivalent to a CC0 license, but excludes certain uses after all.<sup><a href="https://fodina.de/image-databases/#footnote_6_5636" id="identifier_6_5636" class="footnote-link footnote-identifier-link" title="Challengingly, these databases often allow commercial use, but at the same time prohibit the sale of the images, even in print, or their incorporation into other databases">7</a></sup>. E.g. <a href="https://www.pexels.com/" class="broken_link">pexel</a><sup><a href="https://fodina.de/image-databases/#footnote_7_5636" id="identifier_7_5636" class="footnote-link footnote-identifier-link" title="for licensing cf. https://www.pexels.com/license/">8</a></sup>, <a href="https://unsplash.com/">unsplash</a><sup><a href="https://fodina.de/image-databases/#footnote_8_5636" id="identifier_8_5636" class="footnote-link footnote-identifier-link" title="for licensing cf. https://unsplash.com/license">9</a></sup>, or <a href="https://pixabay.com/" class="broken_link">pixabay</a><sup><a href="https://fodina.de/image-databases/#footnote_9_5636" id="identifier_9_5636" class="footnote-link footnote-identifier-link" title="for licensing cf. https://pixabay.com/de/service/license/">10</a></sup>)</li>



<li>Avoid, if possible, image databases that mix commercial paid images with free.<sup><a href="https://fodina.de/image-databases/#footnote_10_5636" id="identifier_10_5636" class="footnote-link footnote-identifier-link" title="Too great the risk that you pick a non-free image.">11</a></sup> E.g. <a href="https://freephotos.cc/en">freephotos</a> or <a href="https://thenounproject.com/">the nounproject</a></li>



<li>Definitely avoid meta image databases in any case.<sup><a href="https://fodina.de/image-databases/#footnote_11_5636" id="identifier_11_5636" class="footnote-link footnote-identifier-link" title="What exactly applies here is very hard to track there.">12</a></sup></li>
</ul>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>



<p></p><div class="wp-block-image"><figure class="alignleft size-medium is-resized alignright "><a href="https://fodina.de/wp-content/uploads/2023/03/copyright.svg" data-fancybox><img decoding="async" src="https://fodina.de/wp-content/uploads/2023/03/copyright.svg" alt="copyright law" width="200"></a></figure></div> Images, photos, and logos are also subject to copyright law. Often also of the trademark law. Without the photographer or owner granting us the rights of use, we are not allowed to use their photographs and logos. Moreover, even what is pictured can limit our exploitation — while the freedom of art expands our scope. How does a user get out of this ‘snake pit’ unscathed?



<p>On the first attempt, it seems easy. After all, most of the time, the author will only want to ‘illustrate’ her posts. But if she has linked a web store or consulting offer to her site, she earns money indirectly with the images. And thus she uses the images commercially. So again the question is, what can she do?</p>



<p>I have outlined my way above. Two additions to this:</p>



<ul class="wp-block-list">
<li>When it comes to ‘logos’, I search the web presence of the logo owners. Often they tell us explicitly what we can and cannot do with their logos. And this is even true for non-profit organizations, like the <a href="https://opensource.org/">OSI</a>((for logo usage cf. <a href="https://opensource.org/logo-usage-guidelines/">https://opensource.org/logo-usage-guidelines/</a>)) or those of the <a href="https://www.gimp.org/">Gimp</a>((for logo usage cf. <a href="https://github.com/GNOME/gimp/blob/master/docs/Wilber.xcf.gz.README">https://github.com/GNOME/gimp/blob/master/docs/Wilber.xcf.gz.README</a>)).</li>



<li>When it comes to what is pictured, I follow two rules of thumb:
<ul class="wp-block-list">
<li>Be careful with people and products depicted — they’d rather not.</li>



<li>Caution with unknown buildings</li>
</ul>
</li>
</ul>


  <hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-link"></i> And in what way is this …</h5>
  <p class="myPageContext">… part of the overarching topic <i class="fa-brands fa-linux"></i> 
  FOSS <i class="fa-brands fa-osi"></i> Compliance? 
  For fulfilling the requirements of <a href="https://opensource.org/licenses/">FOSS licenses</a>, 
  we have to consider <a href="http://fodina.de/jniz/">specific</a> individual 
  <a href="http://fodina.de/yocto-iot-gplv3/">cases</a> as well as 
  <a href="http://fodina.de/lilypond-gpl/">side effects</a> — for 
  <a href="http://fodina.de/license-compliant-javascript/">software</a>, 
  <a href="http://fodina.de/image-databases/">pictures</a>, or documents. 
  We should unhide <a href="http://fodina.de/cc-by-trolls/">trends</a> and write 
  <a href="http://fodina.de/bosl-3-0/">guidelines</a>. Above all, however, we must 
  drive forward the <a href="http://fodina.de/tdosca/">automation of license fulfillment</a>, 
  make our <a href="http://fodina.de/oslic/">licensing knowledge</a> freely available, 
  cast it into <a href="http://fodina.de/oscad/">smaller tools</a>, and 
  <a href="http://fodina.de/oscake/">bring it into larger systems</a>: Because FOSS 
  thrives on freedom through license fulfillment, large and small. 
  That’s what also this article is about.</p>
  <hr class="wp-block-separator has-alpha-channel-opacity">
<ol class="footnotes"><li id="footnote_0_5636" class="footnote">We’re allowed to use those for no consideration, after all.</li><li id="footnote_1_5636" class="footnote">for licensing see <a href="https://pxhere.com/en/license">https://pxhere.com/en/license</a></li><li id="footnote_2_5636" class="footnote">for licensing cf. <a href="https://openclipart.org/faq">https://openclipart.org/faq</a></li><li id="footnote_3_5636" class="footnote">for licensing cf. <a href="https://commons.wikimedia.org/wiki/Commons:Licensing/de">https://commons.wikimedia.org/wiki/Commons:Licensing/de</a></li><li id="footnote_4_5636" class="footnote">for the layer model of CC licenses, see <a href="https://creativecommons.org/licenses/">https://creativecommons.org/licenses/</a></li><li id="footnote_5_5636" class="footnote">Because legally even the simplest blog can still be interpreted as a commercial enterprise.</li><li id="footnote_6_5636" class="footnote">Challengingly, these databases often allow commercial use, but at the same time prohibit the sale of the images, even in print, or their incorporation into other databases</li><li id="footnote_7_5636" class="footnote">for licensing cf. <a href="https://www.pexels.com/license/" class="broken_link">https://www.pexels.com/license/</a></li><li id="footnote_8_5636" class="footnote">for licensing cf. <a href="https://unsplash.com/license">https://unsplash.com/license</a></li><li id="footnote_9_5636" class="footnote">for licensing cf. <a href="https://pixabay.com/de/service/license/" class="broken_link">https://pixabay.com/de/service/license/</a></li><li id="footnote_10_5636" class="footnote">Too great the risk that you pick a non-free image.</li><li id="footnote_11_5636" class="footnote">What exactly applies here is very hard to track there.</li></ol><p>The post <a href="https://fodina.de/image-databases/">Getting Nice Pictures — Where From, If Not Steal?</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/image-databases/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>A Picture Credit Page? Really?</title>
		<link>https://fodina.de/picture-credit-page/</link>
					<comments>https://fodina.de/picture-credit-page/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Wed, 01 Mar 2023 09:10:45 +0000</pubDate>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[bootScore]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Licensing]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5631</guid>

					<description><![CDATA[<p>I don’t buy images. Never. I take my own pictures. Or I use free images released under a Creative Commons License. Or in the ‘public domain’. Some image databases offer their photographs under their own licenses, equivalent to the free licenses, as long as I do not make their images publicly available through another image [&#8230;]</p>
<p>The post <a href="https://fodina.de/picture-credit-page/">A Picture Credit Page? Really?</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I don’t buy images. Never. I take my own pictures. Or I use free images released under a <a href="https://creativecommons.org/licenses/?lang=de">Creative Commons License</a>. Or in the ‘public domain’. Some image databases offer their photographs under their own licenses, equivalent to the free licenses, as long as I do not make their images publicly available through another image database. I accept that as well. And as open-source licenses do, too, <a href="https://fodina.de/image-databases/">some ‘picture’ licenses impose certain duties on me</a>. Thus, I need <a href="https://fodina.de/picture-credits/">a picture credit page</a>:<span id="more-5631"></span></p>



<p>For example, sometimes I have to say where I got the image, who its photographer is, and what license it is under. The right place to fulfill such conditions is a page for image credits<sup><a href="https://fodina.de/picture-credit-page/#footnote_0_5631" id="identifier_0_5631" class="footnote-link footnote-identifier-link" title="BTW: In the European legal space, there is no such thing as 'public domain'. But we can usually use the images published in this way in America">1</a></sup>:</p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/bilderverzeichnis">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solution</h2>



<h3 class="wp-block-heading">A Table For Image Credits</h3>



<ul class="wp-block-list">
<li>Create a page ‘Image Credits’ and include it on your site like your imprint</li>



<li>Install the plugin <a href="https://de.wordpress.org/plugins/tablepress/">TablePress</a>.</li>



<li>Create a table with the 4 columns ‘Picture’, ‘Download &amp; Licensing’, ‘License’, and ‘Attribution’.</li>



<li>Include this table in your page <em>Image Credits</em> by using the TablePress shortcode.</li>
</ul>



<h3 class="wp-block-heading">A New Image Reference</h3>



<ul class="wp-block-list">
<li>Add a new row to the image reference table.</li>



<li>Concerning the first column ‘IMAGE’ 
<ul class="wp-block-list">
<li>open the media library, click on the new image and remember its ID, which is displayed in the browser URL.</li>



<li>enter the already-known short code <code>wrong image data</code>.</li>
</ul>
</li>



<li>In the second column, link an appropriate text to the same image in the database. If the target page does not contain a licensing statement, add a second link in the same column that leads to the licensing statement of the picture database.</li>



<li>In the third column, link the license name to the license text, preferably in the version from the image database.</li>



<li>In the fourth column, enter all the information that the license requires.</li>
</ul>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>



<p>First things first: The WordPress plugin <em><a href="https://de.wordpress.org/plugins/tablepress/">TablePress</a></em> is <a href="https://de.wordpress.org/plugins/tablepress/#developers">actively maintained</a> and is — according to the file <a href="https://plugins.trac.wordpress.org/browser/tablepress/trunk/readme.txt">readme.txt</a> — GPL‑2.0 licensed. So this is a ‘flawless’ piece of Open-Source software.</p>



<p>Finally, the more complex aspects: Why do we need an image credit at all? Formally, we don’t! We just need to fulfill in some way every requirement of the license that has been linked to the image we are using. But the license compliance itself is non-negotiable for the sincere user: either she respects the terms of the license, or she does not use the image.<sup><a href="https://fodina.de/picture-credit-page/#footnote_1_5631" id="identifier_1_5631" class="footnote-link footnote-identifier-link" title="I have already written about image trolls and their 'business model'">2</a></sup></p>



<p>That’s why I make things simple for myself: I enter <strong>every</strong> image into my table for image credits according to the marked pattern. Even those, where I am free to say nothing — like with PxHere pictures. And if I follow the pattern, nothing slips through my hands either. Hopefully.</p>



<p>To that end, I’ve written myself a set of short codes that make it a snap to add a new image to the table. I will gladly pass on these codes on request.</p>


<hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-road"></i> And how does this …</h5>
  <p class="myPageContext">… support our 
  <a href="/bootscore-migration/">migration</a> to 
  <a href="https://bootscore.me/">bootScore</a>? Well,
  once started with <a href="/pimp-your-bootscore/">improving</a> the
  <a href="/speed-up-images">image handling</a>, a web designer will 
  also notice the <a href="/blurred-featured-images/">blurred ‘featured images’</a> 
  of bootScore. She will <a href="/larger-image-squares/">try</a> and 
  <a href="/less-blurred-images/">refine</a> solutions. And she may also tackle them 
  <a href="/without-any-blurred-images/">with new HTML‑5 techniques</a>. Because with 
  that, <a href="/image-databases/">a fancier image strategy</a> combined 
  with <a href="/picture-credit-page/">an integrated license fulfillment process</a>
  and its own <a href="/logos-and-favicons/">logo</a> will really make sense.
  However, pictures bring colors to reading. So they should be integrated into 
  <a href="}/color-concept">a customized color concept</a>. 
  This post also contributes something to this topic.
  </p><hr class="wp-block-separator has-alpha-channel-opacity">

<ol class="footnotes"><li id="footnote_0_5631" class="footnote">BTW: In the European legal space, there is no such thing as ‘public domain’. But we can usually use the images published in this way in America</li><li id="footnote_1_5631" class="footnote">I have already written about image trolls and their ‘business model’</li></ol><p>The post <a href="https://fodina.de/picture-credit-page/">A Picture Credit Page? Really?</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/picture-credit-page/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Larger Picture Squares — A Remedy For Blurred bootScore Images?</title>
		<link>https://fodina.de/larger-image-squares/</link>
					<comments>https://fodina.de/larger-image-squares/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Mon, 27 Feb 2023 19:42:30 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bootScore]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5619</guid>

					<description><![CDATA[<p>Avoiding distorted featured images is possible. We have shown that. However, our method is not yet optimal: if we let WordPress when uploading pictures, also crop the medium-sized thumbnails as squares, we give up what is commonly expected. Maybe other plugins need the ‘medium’ thumbnails in the original aspect ratio after all. So it would [&#8230;]</p>
<p>The post <a href="https://fodina.de/larger-image-squares/">Larger Picture Squares — A Remedy For Blurred bootScore Images?</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Avoiding distorted featured images is possible. We have <a href="https://fodina.de/blurred-featured-images/">shown</a> that. However, our method is not yet optimal: if we let WordPress when uploading pictures, also crop the medium-sized thumbnails as squares, we give up what is commonly expected. Maybe other plugins need the ‘medium’ thumbnails in the original aspect ratio after all. So it would be better if we left the common thumbnail formats untouched. But we still need larger picture squares:<span id="more-5620"></span></p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/groessere-bild-quadrate">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solution</h2>



<ul class="wp-block-list">
<li>Enter the following lines in your <code>functions.php</code>:</li>
</ul>



<pre class="wp-block-code"><code>// let WordPress also derive this square version from the uploaded images
add_image_size( 'bsTeaser', 600, 600, true );</code></pre>



<ul class="wp-block-list">
<li></li>
</ul>



<ul class="wp-block-list">
<li>Replace the <code>true</code> or <code>1</code> with <code>false</code> or <code>0</code> in the recently added lines, with which we had also enabled cropping of the middle size:</li>
</ul>



<pre class="wp-block-code"><code>//do not(!) crop the medium size images to the defined values exactly
// as it is done for thumbnails
if(false === get_option("medium_crop")) {
  add_option("medium_crop", "0");
} else {
  update_option("medium_crop", "0");
}</code></pre>



<ul class="wp-block-list">
<li>Copy <code>bootscore-main/index.php</code> to <code>bootscore-child/home.php</code>.</li>



<li>In <code>home.php</code>, replace the string <code>get_the_post_thumbnail(null, 'medium')</code> in both places with ‘get_the_post_thumbnail(null, ‘bsTeaser’)</li>
</ul>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>



<p>Let’s review these steps for understanding the idea:</p>



<p>With the directive <em>add_image-size</em>, we enforce WordPress — when it loads an image into the media library — not only to compute the traditional smaller sizes as they are configured in <em>Settings/Media</em>, but also to create a <code>600x600</code> thumbnail. With the name <em>bsTeaser</em> we can request the path to this new image from WordPress to embed it in a post.<sup><a href="https://fodina.de/larger-image-squares/#footnote_0_5620" id="identifier_0_5620" class="footnote-link footnote-identifier-link" title="on php level">1</a></sup> And with the inserted value <em>true</em> we make WordPress cropping the original to a square.</p>



<p>So, why <em>600x600</em> and not <em>300x300</em> or <em>400x400</em> squares? This is due to <em>bootScore</em>! <em>Bootstrap</em> — and thus <em>bootScore</em> — do not work with absolute sizes. Rather, they divide the available space into 12 columns of equal width. And sizes are then specified relative to column widths. Something like <em>as wide as including column 4 up to and including column 6</em>. Of course, <em>Bootstrap</em> says this much more elegantly and in a more ‘encapsulated’ way. </p>



<p>But the effect is the same: In a responsive design, the size of the screen showing a page determines how much space there actually is from column 4 to column 6. So, the browser of another machine mostly must convert an image that by default fits into the space defined by the size of the first.</p>



<p>Rendering a picture down preserves the sharpness. Only some details become invisible. But rendering a picture up blurs it: Neither WordPress nor the browser knows, how to fill the new space in accordance with reality. So if we want to add images to bootstrap areas in a way that they look good on large screens, we need to increase the likelihood that the images will be rendered down rather than rendered up. The best way to do that would be to just embed the original images into the pages and let the client machine decrease them. </p>



<p>But this slows down the delivery of a page: transferring larger images over the net takes more time than smaller ones. And decreasing larger images needs more computing time than decreasing smaller ones. In fact, we are trying to find empirically the best solution. And thus — for now — <em>600x600</em> seems to us to be the best size.</p>



<p>After all, in our previous post, we had urged WordPress to crop the medium size as well. We have to resolve that. Just deleting the corresponding lines from the <code>functions.php</code> is not enough, though. WordPress has remembered our previous settings. So we have to overwrite them explicitly.</p>



<p>Finally, we copy the file <code>index.php</code> from the <em>bootScore</em> main theme under the name <code>home.php</code> into our child theme folder. This enforces WordPress to start on a higher level of its <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/">template hierarchy</a>. So we don’t deprive ourselves of the fallback solution.</p>



<p>Remaining to mention, why we don’t replace the previous solution altogether with this ‘better’ one? Well, sometimes good is good enough. The better one would only make more work without advancing the result. So if you are sure that you don’t need the medium files in the original aspect ratio, you can well stay with our first approach.</p>


<hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-road"></i> And how does this …</h5>
  <p class="myPageContext">… support our 
  <a href="/bootscore-migration/">migration</a> to 
  <a href="https://bootscore.me/">bootScore</a>? Well,
  once started with <a href="/pimp-your-bootscore/">improving</a> the
  <a href="/speed-up-images">image handling</a>, a web designer will 
  also notice the <a href="/blurred-featured-images/">blurred ‘featured images’</a> 
  of bootScore. She will <a href="/larger-image-squares/">try</a> and 
  <a href="/less-blurred-images/">refine</a> solutions. And she may also tackle them 
  <a href="/without-any-blurred-images/">with new HTML‑5 techniques</a>. Because with 
  that, <a href="/image-databases/">a fancier image strategy</a> combined 
  with <a href="/picture-credit-page/">an integrated license fulfillment process</a>
  and its own <a href="/logos-and-favicons/">logo</a> will really make sense.
  However, pictures bring colors to reading. So they should be integrated into 
  <a href="}/color-concept">a customized color concept</a>. 
  This post also contributes something to this topic.
  </p><hr class="wp-block-separator has-alpha-channel-opacity">

<ol class="footnotes"><li id="footnote_0_5620" class="footnote">on php level</li></ol><p>The post <a href="https://fodina.de/larger-image-squares/">Larger Picture Squares — A Remedy For Blurred bootScore Images?</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/larger-image-squares/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Blurred Featured Images In BootScore?</title>
		<link>https://fodina.de/blurred-featured-images/</link>
					<comments>https://fodina.de/blurred-featured-images/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Sun, 26 Feb 2023 18:07:15 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bootScore]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5610</guid>

					<description><![CDATA[<p>bootScore — the Bootstrap-based WordPress starter theme — can only be designed via CSS, PHP, and JS programming: If you want to fashion your website, you need to program. bootScore integrates Bootstrap technically and leaves the visible details to the programming web designers. And by default, it delivers sometimes blurred featured images. Is it an [&#8230;]</p>
<p>The post <a href="https://fodina.de/blurred-featured-images/">Blurred Featured Images In BootScore?</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><a href="https://bootscore.me/">bootScore</a> — the Bootstrap-based WordPress starter theme — can only be <a href="http://bootscore.me/documentation/getting-started/">designed via CSS, PHP, and JS programming</a>: If you want to fashion your website, you need to program. <em>bootScore</em> integrates <em>Bootstrap</em> technically and leaves the <a href="https://fodina.de/speed-up-images/">visible details</a> to the programming web designers. And by default, it delivers sometimes blurred featured images. Is it an unavoidable task to fix that afterward?<span id="more-5610"></span></p>



<p>One example of that challenge is <em>bootScore</em>’s handling of the <a href="https://wpastra.com/guides-and-tutorials/wordpress-featured-image/">primary post images (= ‘featured images’)</a>. By default, the web designer explicitly assigns a picture to a post. The browser displays this picture above the text of a page as it has been uploaded into the media library. <em>bootScore</em> manages this quite well. Usually, a theme offers also a preview list of all posts. In this list, each excerpt of a post is supplemented by the respective ‘featured image’. <em>bootScore</em> organizes that, too. However, the displaying browser blurs the featured images in the post preview — although they look perfect in the post view.</p>



<p>I had to think around three corners to understand why this happened. And around one corner to find the solution:</p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/verwischte-primaere-beitragsbilder">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solution</h2>



<ul class="wp-block-list">
<li>Enter the following code into your <code>functions.php</code>:</li>
</ul>



<pre class="wp-block-code"><code>// crop the medium size images to the defined values exactly
// as it is done for thumbnails
if(false === get_option("medium_crop")) {
  add_option("medium_crop", "1");
} else {
  update_option("medium_crop", "1");
}</code></pre>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>



<p>So, what’s the problem:</p>



<p>Ideally — according to the web — primary post images (= <a href="https://wpastra.com/guides-and-tutorials/wordpress-featured-image/">‘Featured Images’</a>) shall have a 16:9 ratio, e.g. in the sizes <em>1200x628 </em>or <em>1280</em>x768.<sup><a href="https://fodina.de/blurred-featured-images/#footnote_0_5610" id="identifier_0_5610" class="footnote-link footnote-identifier-link" title="But even in 4:3 format (1200:800) the problem outlined here would arise.">1</a></sup> WordPress already calculates in advance — when uploading — smaller versions.<sup><a href="https://fodina.de/blurred-featured-images/#footnote_1_5610" id="identifier_1_5610" class="footnote-link footnote-identifier-link" title="thumbnail: 150x150, medium: <300x<300 und large: <1024x<1024">2</a></sup> So it can serve a request faster: It does not have to deliver the large uploaded images again and again to the browser (transfer time), which renders them down to the desired smaller dimensions (computing time) on the client machine. On the other end, WordPress allows the web designer to ask for and include the most appropriate image file for a space.</p>



<p>So if I want to illustrate a list of just article titles, I can have WordPress provide me with the path to the smallest image and prepend it to the entry. If I want to beautify the starting lines of the posts, I can ask WordPress for the paths of the medium-large files and have them placed aside from the article’s beginning.</p>



<p>And here it comes: WordPress calculates the additional image files in advance. For those in the smallest thumbnail format, it crops the files to a square size. For the others, it keeps the aspect ratio by default. So for an original image of size ‘1200x628’ it creates a small preview file of size ‘150x150’ (thumbnail) and a larger preview file of size ‘300 x 157’ (medium). But in the list with the article beginnings, <em>bootScore</em> has provided a square space of — for example — <code>300 x 300</code>. Thus, if WordPress has sent the browser the small preview file, the browser upsizes the image from <code>150x150</code> to <code>300x300</code>, which makes it blurry. If WordPress has sent the medium preview file, the browser converts the image from <code>300x157</code> to <code>300x300</code>, which distorts it.</p>



<p>So, plague or cholera! Even if I had manually squared all primary image files. The browser distorts or blurs the large image above the post. Either in the preview of the post or in the post itself.</p>



<p>However, I wanted to reprogram or exchange the <em>bootScore</em> templates only in case of an emergency.<sup><a href="https://fodina.de/blurred-featured-images/#footnote_2_5610" id="identifier_2_5610" class="footnote-link footnote-identifier-link" title="bootScore offers many variants.">3</a></sup> </p>



<p>So the only thing left to do was to persuade WordPress itself to square the middle format as well. And for this, I actually only had to modify a parameter via the <code>functions.php</code>.<sup><a href="https://fodina.de/blurred-featured-images/#footnote_3_5610" id="identifier_3_5610" class="footnote-link footnote-identifier-link" title="which I learned of course from the net: see stackoverflow 3454337">4</a></sup></p>


<hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-road"></i> And how does this …</h5>
  <p class="myPageContext">… support our 
  <a href="/bootscore-migration/">migration</a> to 
  <a href="https://bootscore.me/">bootScore</a>? Well,
  once started with <a href="/pimp-your-bootscore/">improving</a> the
  <a href="/speed-up-images">image handling</a>, a web designer will 
  also notice the <a href="/blurred-featured-images/">blurred ‘featured images’</a> 
  of bootScore. She will <a href="/larger-image-squares/">try</a> and 
  <a href="/less-blurred-images/">refine</a> solutions. And she may also tackle them 
  <a href="/without-any-blurred-images/">with new HTML‑5 techniques</a>. Because with 
  that, <a href="/image-databases/">a fancier image strategy</a> combined 
  with <a href="/picture-credit-page/">an integrated license fulfillment process</a>
  and its own <a href="/logos-and-favicons/">logo</a> will really make sense.
  However, pictures bring colors to reading. So they should be integrated into 
  <a href="}/color-concept">a customized color concept</a>. 
  This post also contributes something to this topic.
  </p><hr class="wp-block-separator has-alpha-channel-opacity">

<ol class="footnotes"><li id="footnote_0_5610" class="footnote">But even in 4:3 format (1200:800) the problem outlined here would arise.</li><li id="footnote_1_5610" class="footnote">thumbnail: 150x150, medium: &lt;300x&lt;300 und large: &lt;1024x&lt;1024</li><li id="footnote_2_5610" class="footnote"><em>bootScore</em> offers many variants.</li><li id="footnote_3_5610" class="footnote">which I learned of course from the net: see <a href="https://stackoverflow.com/questions/3454337/crop-thumbnail-to-exact-dimensions-on-wordpress-for-medium-size">stackoverflow 3454337</a> </li></ol><p>The post <a href="https://fodina.de/blurred-featured-images/">Blurred Featured Images In BootScore?</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/blurred-featured-images/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fasten Your Fancy Images</title>
		<link>https://fodina.de/speed-up-images/</link>
					<comments>https://fodina.de/speed-up-images/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Fri, 24 Feb 2023 17:19:06 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bootScore]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=5583</guid>

					<description><![CDATA[<p>In the case of Fancy Images, we show our reader first a tiny image. And on her request — wants to say: click — also a larger version. For implementing this feature, I initially put the URL to the uploaded image in the href-attribute of the fancy link and in the src attribute of the [&#8230;]</p>
<p>The post <a href="https://fodina.de/speed-up-images/">Fasten Your Fancy Images</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In the case of <em><a href="https://fodina.de/fancy-boxes/">Fancy Images</a>,</em> we show our reader first a tiny image. And on her request — wants to say: click — also a larger version. For implementing this feature, I initially put the URL to the uploaded image in the <code>href</code>-attribute of the fancy link and in the <code>src</code> attribute of the <code>img</code> tag. That slows down our site. We should fasten our fancy images:<span id="more-5583"></span></p>



<p>Until now, the browser that is supposed to display the ‘<a href="https://github.com/fancyapps/fancybox/">Fancy Box Image</a>’ always fetches the large image — even if the user only wants to see the reduced version. And then browser reduces it:</p>



<pre class="wp-block-code"><code>&lt;a href="ORIGINAL_IMAGE_URL" data-fancybox=""&gt;&lt;img src="ORIGINAL_IMAGE_URL" width="SMALLER_PLEASE"&gt;&lt;/a&gt;</code></pre>



<p>Thus, the browser that is supposed to display the image always downloads the large image — even if our user only wants to see the reduced version. And then it renders the large version down. In other words: the bigger the original image, the longer the download, the longer the rendering, and the later the display. But WordPress has already precalculated different versions of the images. So why not take the one first and get the big one only on demand?</p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/bilder-beschleunigen">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solution</h2>



<ul class="wp-block-list">
<li>Check that your <code>functions.php</code> contains the following code for displaying block images<sup><a href="https://fodina.de/speed-up-images/#footnote_0_5583" id="identifier_0_5583" class="footnote-link footnote-identifier-link" title="Of course, I have already updated the elder versions in the elder posts. So, probably you will already have incorporated the improved version into your functions.php. If so, take this post an explanation how to deal with the pictures WordPress pre-calculates when you upload your image.">1</a></sup>:</li>
</ul>



<pre class="wp-block-code"><code>/*
 * Simple short code for inserting a fancy boxed image 
 * (C) 2023 Karsten Reincke
 * SPDX-License-Identifier: MIT
 */
function fcbPicCode($atts){
  $atts = (array) $atts;
  $imid = $atts[0];   // obligatoric parameter
  $width = $atts[1];  // obligatoric parameter
  $wpsize = "";       // thumbnail, medium, large, or full
  $alt="";                    // optional parameter
  $style="is-style-default";  // optional parameter 
  $align="alignleft";         // optional parameter

  /* IDEA: try to download the best fitting image size be default.
   * Download the full sized image if and when the user had said
   * she wants to see it by a click (fancy)
   */
  if ($width &lt;= 150)
    $wpsize = "thumbnail";
  elseif ($width &lt;=300)
    $wpsize = "medium";
  elseif ($width &lt;= 1024)
    $wpsize = "large";
  else
    $wpsize = "full";

  /* get the path to the original image */
  $fimgp=wp_get_attachment_image_url($imid,"full");
  if (!($fimgp)) return ("wrong image data");
  /* if it's an svg, there won't be any smaller images */
  if (wp_get_image_mime($fimgp) == "svg" )
    $simgp=$fimgp;
  else {
  /* otherwise get the path to the fitting smaller image */
    $simgp=wp_get_attachment_image_url($imid,$wpsize);
    if (!($simgp)) $simgp=$fimgp;
  }

  if (array_key_exists(2,$atts)) {
    $alt=$atts[2];
    if (array_key_exists(3,$atts)) {
      $style=$atts[3];
      if (array_key_exists(4,$atts))
        $align=$atts[4];
    }
  }

  $res= 
   '&lt;figure class="wp-block-image ' . $align . ' size-medium is-resized ' . $style . '"&gt;' .
     '&lt;a href="' . $fimgp . '" data-fancybox=""&gt;' .
       '&lt;img src="' . $simgp . '" alt="'. $alt .'" width="' . $width . '" &gt;' .
      '&lt;/a&gt;' .
   '&lt;/figure&gt;';
  return $res;

}
add_shortcode('fcbpic', 'fcbPicCode');</code></pre>



<ul class="wp-block-list">
<li>Check that your <code>functions.php</code> contains the following code for displaying inline images:</li>
</ul>



<pre class="wp-block-code"><code>/*
 * Simple short code for inserting a fancy inline img 
 * (C) 2023 Karsten Reincke
 * SPDX-License-Identifier: MIT
 */
function fciPicCode($atts){
  $atts = (array) $atts;
  $imid = $atts[0];   // obligatoric parameter
  $width = $atts[1];  // obligatoric parameter
  $wpsize = "";       // thumbnail, medium, large, or full
  $alt="";                    // optional parameter
  $style="is-style-default";  // optional parameter 

  /* IDEA: try to download the best fitting image size be default.
   * Download the full sized image if and when the user had said
   * she wants to see it by a click (fancy)
   */
  if ($width &lt;= 150)
    $wpsize = "thumbnail";
  elseif ($width &lt;=300)
    $wpsize = "medium";
  elseif ($width &lt;= 1024)
    $wpsize = "large";
  else
    $wpsize = "full";

  /* get the path to the original image */
  $fimgp=wp_get_attachment_image_url($imid,"full");
  if (!($fimgp)) return ("wrong image data");
  /* if it's an svg, there won't be any smaller images */
  if (wp_get_image_mime($fimgp) == "svg" )
    $simgp=$fimgp;
  else {
  /* otherwise get the path to the fitting smaller image */
    $simgp=wp_get_attachment_image_url($imid,$wpsize);
    if (!($simgp)) $simgp=$fimgp;
  }

  if (array_key_exists(2,$atts)) {
    $alt=$atts[2];
    if (array_key_exists(3,$atts)) {
      $style=$atts[3];
    }
  }

  $res= 
     '&lt;a href="' . $fimgp . '" data-fancybox=""&gt;' .
      '&lt;img src="' . $simgp . '" alt="'. $alt .'" width="' . $width . '" &gt;' .
     '&lt;/a&gt;' ; 
  return $res;

}
add_shortcode('fcipic', 'fciPicCode');</code></pre>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>



<p>The idea of these functions is clear: We let WordPress find the image file that is closest to the requested display width. But for <a href="https://fodina.de/fancy-svgs/"><code>SVG</code>s</a>, WordPress (or the corresponding plugin) does not pre-calculate other versions.<sup><a href="https://fodina.de/speed-up-images/#footnote_1_5583" id="identifier_1_5583" class="footnote-link footnote-identifier-link" title="Computing other sizes in advance would make no sense, because SVGs do not have an intended initial size.">2</a></sup> Therefore, we first get the original image, check if it is an SVG, and in the case of raster graphics let WordPress find the link to the image that fits best to the desired size. This would create an entry on the page like this</p>



<pre class="wp-block-code"><code>&lt;a href="ORIGINAL_IMAGE_URL" data-fancy=""&gt;&lt;img src="SMALL_IMAGE_URL" width="SMALLER_PLEASE"&gt;&lt;/a&gt;</code></pre>



<p>BINGO.</p>


<hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-road"></i> And how does this …</h5>
  <p class="myPageContext">… support our 
  <a href="http://fodina.de/bootscore-migration/">migration</a> to 
  <a href="https://bootscore.me/">bootScore</a>? Well,
  once a web designer has taken <a href="http://fodina.de/pimp-your-bootscore/">the first 
  general steps</a> and has checked <a href="http://fodina.de/bootscore-plus-seo/">SEO</a>, she
  will soon turn to a really thick board, her <a href="http://fodina.de/clean-menus/">properly</a> 
  <a href="http://fodina.de/deeper-nested-menus/">clustered</a> 
  and <a href="http://fodina.de/menu-stack/">presented</a> 
  <a href="http://fodina.de/shortcodes-in-menu/">menu</a> without getting
  <a href="http://fodina.de/no-hover-menus/">too fancy</a>. 
  Eventually, she is going to <a href="http://fodina.de/speed-up-images/"> spruce and speed up</a> 
  the display of <a href="http://fodina.de/fancy-boxes/">fixed</a> and 
  <a href="http://fodina.de/fancy-svgs/">scalable</a> images. 
  This post talks about a part of this way.
  </p><hr class="wp-block-separator has-alpha-channel-opacity">

<ol class="footnotes"><li id="footnote_0_5583" class="footnote">Of course, I have already updated the elder versions in the elder posts. So, probably you will already have incorporated the improved version into your <code>functions.php</code>. If so, take this post an explanation how to deal with the pictures WordPress pre-calculates when you upload your image.</li><li id="footnote_1_5583" class="footnote">Computing other sizes in advance would make no sense, because SVGs do not have an intended initial size.</li></ol><p>The post <a href="https://fodina.de/speed-up-images/">Fasten Your Fancy Images</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/speed-up-images/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
