<?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>Wadiweb</title>
	<atom:link href="https://www.wadiweb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://35.156.215.98/</link>
	<description></description>
	<lastBuildDate>Tue, 03 Sep 2024 12:59:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>VPS vs Managed WordPress Hosting For WordPress Websites</title>
		<link>https://www.wadiweb.com/vps-vs-managed-wordpress-hosting/</link>
		
		<dc:creator><![CDATA[Mohammed Rezq]]></dc:creator>
		<pubDate>Sun, 07 Apr 2024 14:07:51 +0000</pubDate>
				<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Managed WordPress Hosting]]></category>
		<category><![CDATA[VPS Hosting]]></category>
		<guid isPermaLink="false">https://www.wadiweb.com/?p=4668</guid>

					<description><![CDATA[<p>Which is the best option to host your WordPress website? is it VPS (Virtual Private Server) like: Digital Ocean, Vultr, Linode (Akami), Lightsail AWS, or the easier more expensive option which is Managed WordPress Hosting like: WPEngine, Kinsta, Rocket.net? The answer, as with many things, is: It depends! When it comes to WordPress Website hosting,...</p>
<p>The post <a href="https://www.wadiweb.com/vps-vs-managed-wordpress-hosting/">VPS vs Managed WordPress Hosting For WordPress Websites</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Which is the best option to host your WordPress website? is it VPS (Virtual Private Server) like: Digital Ocean, Vultr, Linode (Akami), Lightsail AWS, or the easier more expensive option which is Managed WordPress Hosting like: WPEngine, Kinsta, Rocket.net? The answer, as with many things, is: It depends!</p>



<p>When it comes to WordPress Website hosting, VPS (Virtual Private Server) and Managed WordPress hosting are two of the best choices, each designed to meet different needs. So, understanding the benefits of VPS and Managed WordPress hosting is essential for businesses and individuals to make the best informed decision. This article explores the unique advantages of each option, helping you determine which one is the best fit for your requirements.</p>



<p class="has-theme-palette-9-color has-theme-palette-5-background-color has-text-color has-background" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--60)">While VPS hosting often presents a more cost-effective option compared to Managed WordPress Hosting, it requires a higher level of technical expertise. Managing a VPS involves handling server configurations, security protocols, and customizations—tasks that can be challenging for those without a solid technical background. On the other hand, Managed WordPress Hosting simplifies the process by taking care of these technical responsibilities for you, allowing you to focus more on growing your business. However, this convenience comes at a premium, and the service may also come with some limitations on customization and flexibility.</p>



<h2 class="wp-block-heading"><strong>VPS Hosting: Flexibility and Control</strong></h2>



<ol class="wp-block-list">
<li><strong>Customizability and Control</strong>: VPS offers a separate partition on a physical server, giving users the freedom to customize their environment. This means you can install and configure any software you need, set up custom firewalls, and make changes to the server settings to optimize performance and security.</li>



<li><strong>Scalable Resources</strong>: With VPS, scaling resources up or down is straightforward, accommodating the fluctuating traffic and resource demands of a growing website. This scalability ensures that you pay only for the resources you use, making VPS a cost-effective solution for websites experiencing growth.</li>



<li><strong>Enhanced Performance</strong>: Since VPS hosting provides dedicated resources, your website benefits from consistent performance. This is crucial for websites with high traffic or resource-intensive applications, ensuring smooth operation without the risk of being affected by other users&#8217; activities.</li>



<li><strong>Advanced Security Features</strong>: VPS hosting allows for advanced security measures tailored to your specific needs. You can implement robust firewalls, intrusion detection systems, and secure VPNs, providing a higher level of security compared to shared hosting environments.</li>
</ol>



<h2 class="wp-block-heading"><strong>Managed WordPress Hosting: Convenience and Performance</strong></h2>



<ol class="wp-block-list">
<li><strong>Optimized for WordPress</strong>: Managed WordPress hosting is specifically tailored for WordPress websites, offering an environment that&#8217;s optimized for its performance and security needs. This includes features like automatic updates, specialized caching, and enhanced security configurations that are fine-tuned for WordPress.</li>



<li><strong>Ease of Management</strong>: This hosting type takes care of all technical aspects, including updates, backups, and security. It&#8217;s an ideal solution for users who prefer to focus on content creation and business growth rather than server management and technical maintenance.</li>



<li><strong>Expert Support</strong>: Managed WordPress hosting providers usually offer expert support from individuals who specialize in WordPress. This means you can expect quick and knowledgeable assistance with any WordPress-related issues, which can be invaluable for maintaining a smooth-running website.</li>



<li><strong>Built-in Performance Enhancements</strong>: These services often come with built-in caching and performance optimization tools, which can significantly improve website loading times and overall user experience. This is particularly beneficial for SEO and retaining visitors on your site.</li>
</ol>



<h2 class="wp-block-heading"><strong>Choosing Between VPS and Managed WordPress Hosting</strong></h2>



<p>The choice between VPS and Managed WordPress hosting should be guided by your specific needs:</p>



<ul class="wp-block-list">
<li><strong>VPS Hosting</strong> is more suitable for those who require full control over their hosting environment, need to host multiple websites, or have unique software requirements. It&#8217;s ideal for tech-savvy individuals or businesses with IT support that can manage and maintain the server.</li>



<li><strong>Managed WordPress Hosting</strong> is best for users who want a hassle-free hosting experience, primarily focusing on running a WordPress site. It&#8217;s perfect for individuals or businesses that prefer to outsource technical management to focus more on content and business development.</li>
</ul>



<h2 class="wp-block-heading"><strong>List of Best Choices to Host WordPress on VPS</strong></h2>



<ol class="wp-block-list">
<li><strong><strong><a href="https://www.digitalocean.com">DigitalOcean</a></strong></strong>
<ul class="wp-block-list">
<li>Offers flexible and scalable VPS options.</li>



<li>Known for its simplicity and developer-friendly environment.</li>



<li>One-click WordPress installation available.</li>
</ul>
</li>



<li><strong><a href="https://www.linode.com/">Linode</a></strong>
<ul class="wp-block-list">
<li>Provides powerful and affordable VPS hosting.</li>



<li>Great performance and reliability.</li>



<li>Comprehensive documentation and support for WordPress installation.</li>
</ul>
</li>



<li><strong><a href="https://www.vultr.com/">Vultr</a></strong>
<ul class="wp-block-list">
<li>High-performance VPS with a global data center presence.</li>



<li>Easy-to-use interface and one-click WordPress deployment.</li>



<li>Competitive pricing and scalable resources.</li>
</ul>
</li>



<li><strong><a href="https://www.hetzner.com/">Hetzner</a></strong>
<ul class="wp-block-list">
<li>Offers powerful and cost-effective VPS hosting solutions.</li>



<li>Known for its high performance and reliability.</li>



<li>Flexible configurations and excellent support for WordPress.</li>
</ul>
</li>



<li><strong><a href="https://aws.amazon.com/lightsail">Amazon Lightsail</a></strong>
<ul class="wp-block-list">
<li>Part of the Amazon Web Services ecosystem.</li>



<li>Simplified VPS management with pre-configured WordPress instances.</li>



<li>Scalable and reliable infrastructure backed by AWS.</li>
</ul>
</li>



<li><strong><a href="https://www.kamatera.com/">Kamatera</a></strong>
<ul class="wp-block-list">
<li>Offers customizable VPS solutions with high performance.</li>



<li>24/7 technical support and 99.95% uptime guarantee.</li>



<li>Easy-to-use management console for WordPress deployment.</li>
</ul>
</li>



<li><strong><a href="https://www.inmotionhosting.com/">InMotion Hosting</a></strong>
<ul class="wp-block-list">
<li>Provides managed VPS hosting tailored for WordPress.</li>



<li>High-speed performance and excellent customer support.</li>



<li>Free website migration and automated backups.</li>
</ul>
</li>



<li><strong><a href="https://www.a2hosting.com/">A2 Hosting</a></strong>
<ul class="wp-block-list">
<li>Known for its speed and optimized WordPress environments.</li>



<li>Managed VPS options with root access.</li>



<li>Free SSL, SSD storage, and 24/7 support.</li>
</ul>
</li>



<li><strong><a href="https://www.bluehost.com/">Bluehost</a></strong>
<ul class="wp-block-list">
<li>Offers VPS hosting specifically optimized for WordPress.</li>



<li>User-friendly interface and strong performance.</li>



<li>Free domain, SSL certificate, and 24/7 support.</li>
</ul>
</li>



<li><strong><a href="https://www.hostgator.com/">HostGator</a></strong>
<ul class="wp-block-list">
<li>Reliable and affordable VPS hosting with WordPress optimization.</li>



<li>Scalable resources and comprehensive support.</li>



<li>Free website migration and cPanel for easy management.</li>
</ul>
</li>



<li><strong><a href="https://www.siteground.com/">SiteGround</a></strong>
<ul class="wp-block-list">
<li>High-performance VPS hosting with managed WordPress features.</li>



<li>Excellent customer support and robust security.</li>



<li>Free daily backups and SSL certificates.</li>
</ul>
</li>
</ol>



<h2 class="wp-block-heading"><strong>List of Best Choices for Managed WordPress Hosting</strong></h2>



<ol class="wp-block-list">
<li><strong><a href="https://wpengine.com">WP Engine</a></strong>
<ul class="wp-block-list">
<li>Renowned for its performance and reliability.</li>



<li>Offers automatic updates, daily backups, and robust security features.</li>



<li>24/7 customer support and staging environments.</li>
</ul>
</li>



<li><strong><a href="https://kinsta.com">Kinsta</a></strong>
<ul class="wp-block-list">
<li>Built on Google Cloud Platform for excellent speed and reliability.</li>



<li>Automatic daily backups, free SSL, and CDN included.</li>



<li>User-friendly dashboard and 24/7 expert support.</li>
</ul>
</li>



<li><strong><a href="https://getflywheel.com">Flywheel</a></strong>
<ul class="wp-block-list">
<li>Optimized for creative agencies and freelancers.</li>



<li>Offers free migrations, nightly backups, and built-in caching.</li>



<li>User-friendly interface and great customer support.</li>
</ul>
</li>



<li><strong><a href="https://www.rocket.net">Rocket.net</a></strong>
<ul class="wp-block-list">
<li>Built for speed with edge hosting and CDN included.</li>



<li>Automatic updates, daily backups, and free SSL.</li>



<li>24/7 support and exceptional performance.</li>
</ul>
</li>



<li><strong><a href="https://pressable.com">Pressable</a></strong>
<ul class="wp-block-list">
<li>Managed by the same company behind WordPress.com.</li>



<li>Automatic updates, free SSL, and CDN.</li>



<li>24/7 expert support and performance monitoring.</li>
</ul>
</li>



<li><strong><a href="https://www.liquidweb.com">Liquid Web</a></strong>
<ul class="wp-block-list">
<li>High-performance managed WordPress hosting.</li>



<li>Automatic updates, daily backups, and free SSL.</li>



<li>Excellent customer support and staging environments.</li>
</ul>
</li>



<li><strong><a href="https://www.a2hosting.com">A2 Hosting</a></strong>
<ul class="wp-block-list">
<li>Optimized for speed and performance.</li>



<li>Free SSL, CDN, and automatic updates.</li>



<li>24/7 support and free site migration.</li>
</ul>
</li>



<li><strong><a href="https://www.pagely.com">Pagely</a></strong>
<ul class="wp-block-list">
<li>Enterprise-level managed WordPress hosting.</li>



<li>Built on Amazon Web Services for scalability and performance.</li>



<li>Advanced security features, automatic updates, and daily backups.</li>
</ul>
</li>



<li><strong><a href="https://www.cloudways.com">Cloudways</a></strong>
<ul class="wp-block-list">
<li>Managed hosting with a choice of cloud providers (AWS, Google Cloud, etc.).</li>



<li>Offers performance optimization and 24/7 support.</li>



<li>Free SSL, automated backups, and staging environments.</li>
</ul>
</li>



<li><strong><a href="https://www.nexcess.net">Nexcess</a></strong>
<ul class="wp-block-list">
<li>Managed WordPress hosting by Liquid Web.</li>



<li>Automatic updates, daily backups, and built-in CDN.</li>



<li>Advanced security features and 24/7 support.</li>
</ul>
</li>



<li><strong><a href="https://pressidium.com">Pressidium</a></strong>
<ul class="wp-block-list">
<li>High-performance managed WordPress hosting.</li>



<li>Enterprise-grade infrastructure and security.</li>



<li>Automatic updates, daily backups, and 24/7 support.</li>
</ul>
</li>



<li><strong><a href="https://pantheon.io">Pantheon</a></strong>
<ul class="wp-block-list">
<li>Managed WordPress hosting focused on performance and scalability.</li>



<li>Automated workflows and developer-friendly features.</li>



<li>Free SSL, automated backups, and staging environments.</li>
</ul>
</li>



<li><strong><a href="https://www.siteground.com">SiteGround</a></strong>
<ul class="wp-block-list">
<li>Known for excellent customer service and performance.</li>



<li>Offers automatic updates, daily backups, and built-in caching.</li>



<li>Free SSL, CDN, and staging environment.</li>
</ul>
</li>
</ol>



<p>In conclusion, VPS hosting offers flexibility, control, and scalability, making it ideal for growing websites with specific requirements. Managed WordPress hosting, on the other hand, provides a convenient, optimized, and worry-free solution for WordPress users, emphasizing performance and support. Understanding these benefits will help you make an informed choice that aligns with your website&#8217;s needs and your technical expertise.</p>
<p>The post <a href="https://www.wadiweb.com/vps-vs-managed-wordpress-hosting/">VPS vs Managed WordPress Hosting For WordPress Websites</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Enable uploading AVIF Images on WordPress website</title>
		<link>https://www.wadiweb.com/uploading-avif-images-wordpress/</link>
		
		<dc:creator><![CDATA[Mohammed Rezq]]></dc:creator>
		<pubDate>Mon, 11 Mar 2024 23:28:16 +0000</pubDate>
				<category><![CDATA[Website Optimization]]></category>
		<category><![CDATA[Image Optimization]]></category>
		<category><![CDATA[Page speed loading]]></category>
		<guid isPermaLink="false">https://www.wadiweb.com/?p=4645</guid>

					<description><![CDATA[<p>Enabling AVIF images on your WordPress website can significantly enhance your site&#8217;s loading speed and overall performance. AVIF (AV1 Image File Format) is a modern image format that offer superior compression efficiency compared to traditional formats like JPEG and PNG. This means they can make your website faster by reducing the size of the images...</p>
<p>The post <a href="https://www.wadiweb.com/uploading-avif-images-wordpress/">Enable uploading AVIF Images on WordPress website</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Enabling AVIF images on your WordPress website can significantly enhance your site&#8217;s loading speed and overall performance. AVIF (AV1 Image File Format) is a modern image format that offer superior compression efficiency compared to traditional formats like JPEG and PNG. This means they can make your website faster by reducing the size of the images it needs to load, without compromising on image quality.</p>



<p>So, in your WordPress theme add this code into functions.php<br></p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-php" data-lang="PHP" data-show-lang="1"><code>function custom_mime_types( $mime_types ) {
$mime_types[&#39;avif&#39;] = &#39;image/avif&#39;; // Adding .avif
return $mime_types;
}
add_filter( &#39;mime_types&#39;, &#39;custom_mime_types&#39; );

function add_avif_upload_support( $checked, $file, $filename, $mimes ) {
if ( ! $checked[&#39;type&#39;] ) {
$check_filetype = wp_check_filetype( $filename, $mimes );
$ext = $check_filetype[&#39;ext&#39;];
$type = $check_filetype[&#39;type&#39;];
$proper_filename = $filename;

    if ( $type && 0 === strpos( $type, &#39;image/&#39; ) && $ext !== &#39;svg&#39; ) {
        $checked = compact( &#39;ext&#39;, &#39;type&#39;, &#39;proper_filename&#39; );
    } else {
        $checked = array( &#39;ext&#39; =&gt; false, &#39;type&#39; =&gt; false, &#39;proper_filename&#39; =&gt; false );
    }
}

return $checked;

}
add_filter( &#39;wp_check_filetype_and_ext&#39;, &#39;add_avif_upload_support&#39;, 10, 4 );</code></pre></div>



<p>Now you should be able to upload AVIF images into your WordPress website with no problems!.</p>
<p>The post <a href="https://www.wadiweb.com/uploading-avif-images-wordpress/">Enable uploading AVIF Images on WordPress website</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Resize Images for Your Website</title>
		<link>https://www.wadiweb.com/how-to-resize-images-for-your-website/</link>
		
		<dc:creator><![CDATA[Mohammed Rezq]]></dc:creator>
		<pubDate>Sat, 01 Oct 2022 13:54:37 +0000</pubDate>
				<category><![CDATA[Website Optimization]]></category>
		<category><![CDATA[Image Optimization]]></category>
		<category><![CDATA[Image Resizing]]></category>
		<category><![CDATA[Page speed loading]]></category>
		<guid isPermaLink="false">https://www.wadiweb.com/?p=3785</guid>

					<description><![CDATA[<p>Websites nowadays contains hundreds if not thousands of images, so resizing images in bulk for your website is essential. Many online services and WordPress plugins provide such service, but it might be limiting to some extent. Using JavaScript you can achieve a very good results with minimal effort and almost for free!. We will be...</p>
<p>The post <a href="https://www.wadiweb.com/how-to-resize-images-for-your-website/">How to Resize Images for Your Website</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Websites nowadays contains hundreds if not thousands of images, so resizing images in bulk for your website is essential. Many online services and WordPress plugins provide such service, but it might be limiting to some extent. Using JavaScript you can achieve a very good results with minimal effort and almost for free!.</p>



<p>We will be using Sharp Js Library which is an great library for optimizing, resizing , It also has many other features that will help you to improve your images with ease. In this article, we will focus on resizing images using Sharp.</p>



<p><strong>Sharp </strong>requires Node.js to be installed on your Operating System, which you can download below. ( I recommend downloading and installing the stable version for your operating system ).</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button alignleft has-custom-font-size is-style-fill" style="font-size:16px"><a class="wp-block-button__link" href="https://nodejs.org/en/download/" target="_blank" rel="noreferrer noopener">Download Node</a></div>
</div>



<p></p>



<p><strong>Sharp</strong> is a high-speed Node.js module to convert large images in standard formats to smaller, web-friendly JPEG, PNG, WebP, GIF, and AVIF images of varying dimensions.</p>



<p>Using <strong>Sharp</strong> to resize your images is very easy to do, and we will go through the steps to resize your images in bulk for your website.</p>



<h2 class="wp-block-heading">1- Install Sharp Library</h2>



<p>The first step is installing Sharp using npm or yarn</p>



<p>Open your command line terminal in this folder, -I use&nbsp;<a href="https://git-scm.com/downloads" target="_blank" rel="noreferrer noopener">Gitbash</a>– then run the following command</p>



<h4 class="wp-block-heading">NPM</h4>



<p>If you have npm installed then run this line.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>npm i sharp</code></pre></div>



<h4 class="wp-block-heading">Yarn</h4>



<p>Or you can replace npm install with yarn add if you have yarn in your system.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>yarn add sharp</code></pre></div>



<p>It should install the required packages within moments.</p>



<h2 class="wp-block-heading">Script</h2>



<p>Now we should create a new file that will contain our code to resize images, Create a file name <strong>index.js</strong> and add the following code.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const sharp = require(&quot;sharp&quot;);
const fs = require(&quot;fs&quot;);
const path = require(&quot;path&quot;);</code></pre></div>



<p>The packages are Sharp Library(sharp) which we just installed earlier, Filesystem (fs), and path (path) packages which should already.</p>



<p>Now let&#8217;s create a folder that will contain our original images we will name (images). and another folder for outputting resized images we will name (output). </p>



<p>The packages and folders should look something like this</p>



<h4 class="wp-block-heading">Images Resizing Structure</h4>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="355" src="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01134851/sharp-optimizing-1024x355.webp" alt="" class="wp-image-4133" srcset="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01134851/sharp-optimizing-1024x355.webp 1024w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01134851/sharp-optimizing-300x104.webp 300w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01134851/sharp-optimizing-768x266.webp 768w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01134851/sharp-optimizing.webp 1228w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can clone the structure and the code from the <a href="https://github.com/mohammedrezq/sharp-optimizing-images" target="_blank" rel="noreferrer noopener nofollow">GitHub repo Sharp Images Optimization</a></p>



<p>We will add the original images that we will <strong>resize</strong> to the (<strong>images</strong>) folder.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const directoryName = &quot;images&quot;;

const fileNames = fs.readdirSync(directoryName);</code></pre></div>



<p>directoryName variable is the images folder name, and filesNames variable we get to loop through for resizing using Sharp.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>
fileNames.forEach((file) =&gt; {

  const fileFormat = getExtension(file);
  let sh = sharp(&quot;./images/&quot; + file);

  if( &#39;jpg&#39; == fileFormat ) {
    sh.jpeg({
      quality: 80,
      progressive: true,
    }).resize(
      {
        fit:  sharp.fit.contain,
        width: 900,
      }
    )
  } 
});

function getExtension(filename) {
  let ext = path.extname(filename || &quot;&quot;).split(&quot;.&quot;);

  return ext[ext.length - 1];
}</code></pre></div>



<p>Now we will loop through all images that are jpg formatted, and set those images&#8217; quality to 80 (percent) you can set the number higher or lower. you can read more about available options for image optimization (<a href="https://sharp.pixelplumbing.com/api-output">Output Images</a>).</p>



<p>Resizing Images use the method resize, and we will keep images same dimensions, width is set to 900 (PX), this will make the images&#8217; width to 900 Pixels and the height will be resized accordingly with the same dimensions.</p>



<p>You can check more options from (<a href="https://sharp.pixelplumbing.com/api-resize" target="_blank" rel="noreferrer noopener nofollow">Resizing Images</a>) Options.</p>



<p>Add similar logic for WebP and PNG formatted images</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>fileNames.forEach((file) =&gt; {

  const fileFormat = getExtension(file);
  let sh = sharp(&quot;./images/&quot; + file);

  if( &#39;jpg&#39; == fileFormat ) {
    sh.jpeg({
      quality: 80,
      progressive: true,
    }).resize(
      {
        fit:  sharp.fit.contain,
        width: 900,
      }
    )
  } else if (&#39;png&#39; === fileFormat) {
    sh.png({
      quality: 80,
      progressive: true,
    }).resize(
      {
        fit:  sharp.fit.contain,
        width: 900,
      }
    )
  } else if(&#39;webp&#39; === fileFormat){
    sh.webp({lossless:true, quality: 80, alphaQuality: 100, force: true}).resize(
        {fit: sharp.fit.contain, width: 900}
      )
  }
});

function getExtension(filename) {
  let ext = path.extname(filename || &quot;&quot;).split(&quot;.&quot;);

  return ext[ext.length - 1];
}</code></pre></div>



<p>The final code in index.js file should be</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>// Packages
const sharp = require(&quot;sharp&quot;);
const fs = require(&quot;fs&quot;);
const path = require(&quot;path&quot;);

// Original Images directory
const directoryName = &quot;images&quot;;

// Get file names
const fileNames = fs.readdirSync(directoryName);

// Loop through images
fileNames.forEach((file) =&gt; {

  // Get image format (extension)
  const fileFormat = getExtension(file);

  console.log(&quot;fileFormat&quot;, fileFormat)
  if (fileFormat === &quot;svg&quot;) {
    console.log(&quot;SVGs are not processed in this script at the moment&quot;);
    return;
  }
  let sh = sharp(&quot;./images/&quot; + file);

  if( &#39;jpg&#39; == fileFormat ) {
    sh.jpeg({
      quality: 80,
      progressive: true,
    }).resize(
      {
        fit:  sharp.fit.contain,
        width: 900,
      }
    )
  } else if (&#39;png&#39; === fileFormat) {
    sh.png({
      quality: 80,
      progressive: true,
    }).resize(
      {
        fit:  sharp.fit.contain,
        width: 900,
      }
    )
  } else if(&#39;webp&#39; === fileFormat){
    sh.webp({lossless:true, quality: 80, alphaQuality: 100, force: true}).resize(
        {fit: sharp.fit.contain, width: 900}
      )
  }


  console.log(&#39;output/&#39; + file);
  let fileNameWOExtension = file.replace(/\.[^/.]+$/, &quot;&quot;);

  console.log(fileNameWOExtension);


  sh.toFile(&#39;output/&#39; + `${file}`, function (err, info) {
    // console.log(info);
    if(err) {
      console.log(err + &quot;Error occurred while optimization process&quot;)
    }
  })
});

// Get Image Extension
function getExtension(filename) {
  let ext = path.extname(filename || &quot;&quot;).split(&quot;.&quot;);

  return ext[ext.length - 1];
}
</code></pre></div>



<p>After finishing the code and organizing our folders Let&#8217;s add our images and test resizing images</p>



<p>In images folder we have about 25 images free from <a href="https://www.pexels.com/">pexels</a>, images varying in size so we will use Sharp to resize those images making their width 900 Pixels and the height will resize to the same aspect ratio.</p>



<p>Run the following command in the Visual Studio Code terminal (or Git bash or any other terminal to run your commands).</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132252/node-index.-resizing-images-1024x576.webp" alt="" class="wp-image-4121" srcset="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132252/node-index.-resizing-images-1024x576.webp 1024w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132252/node-index.-resizing-images-300x169.webp 300w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132252/node-index.-resizing-images-768x432.webp 768w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132252/node-index.-resizing-images-1536x864.webp 1536w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132252/node-index.-resizing-images.webp 1919w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>node index.js</code></pre></div>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132301/resized-images-1024x576.webp" alt="" class="wp-image-4124" srcset="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132301/resized-images-1024x576.webp 1024w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132301/resized-images-300x169.webp 300w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132301/resized-images-768x432.webp 768w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132301/resized-images-1536x864.webp 1536w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01132301/resized-images.webp 1919w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>You should see the console logs appear in the terminal while resizing images. The time of resizing images depends on the size and quantity of the images. So 25 images didn&#8217;t take more than 2 seconds.</p>



<p>So, let&#8217;s see images before and after resizing dimensions</p>



<h4 class="wp-block-heading">Before Resizing</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="692" height="1024" src="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135905/before-692x1024.jpg" alt="" class="wp-image-4142" srcset="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135905/before-692x1024.jpg 692w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135905/before-203x300.jpg 203w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135905/before-768x1137.jpg 768w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135905/before-1037x1536.jpg 1037w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135905/before-1383x2048.jpg 1383w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135905/before-scaled.jpg 1729w" sizes="(max-width: 692px) 100vw, 692px" /></figure>



<h4 class="wp-block-heading">After Resizing</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="691" height="1024" src="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135853/after-691x1024.jpg" alt="" class="wp-image-4141" srcset="https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135853/after-691x1024.jpg 691w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135853/after-203x300.jpg 203w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135853/after-768x1137.jpg 768w, https://cdn.wadiweb.com/wp-content/uploads/2022/10/01135853/after.jpg 900w" sizes="(max-width: 691px) 100vw, 691px" /></figure>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Resizing images using Sharp doesn&#8217;t require much work after the initial setup. you can resize your images very fast and with many custom options available.</p>



<p>Learn how to optimize images for your website to be production ready (<a href="https://www.wadiweb.com/how-to-optimizie-images-for-your-website/">How to Optimize Images for Your Website</a>).</p>
<p>The post <a href="https://www.wadiweb.com/how-to-resize-images-for-your-website/">How to Resize Images for Your Website</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Optimize Images For Your Website</title>
		<link>https://www.wadiweb.com/how-to-optimizie-images-for-your-website/</link>
		
		<dc:creator><![CDATA[Mohammed Rezq]]></dc:creator>
		<pubDate>Sat, 10 Sep 2022 08:40:36 +0000</pubDate>
				<category><![CDATA[Website Optimization]]></category>
		<category><![CDATA[Image Optimization]]></category>
		<category><![CDATA[Page speed loading]]></category>
		<guid isPermaLink="false">https://www.wadiweb.com/?p=3517</guid>

					<description><![CDATA[<p>Modern websites require lots of media and images to be nice and engaging, but that doesn't have to be at the cost of page speed. Image optimization can help your web pages to have many images and media and still load fast.</p>
<p>The post <a href="https://www.wadiweb.com/how-to-optimizie-images-for-your-website/">How to Optimize Images For Your Website</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Images tend to be the cause of huge bandwidth consumption on modern websites, so knowing that and how to optimize images can save you a lot of money and time. There are 3 ways you can use to optimize your image:</p>



<ul class="wp-block-list"><li>WordPress optimizing plugins. (Mostly Paid)</li><li>Websites for Optimizing Images. (Freemium)</li><li>Optimizing Images Using JS Libraries. (Free)</li></ul>



<h2 class="wp-block-heading">Optimizing Images Using JS Libraries</h2>



<p>Optimizing Images through writing a simple JS script is free and easy and my choice which I use on most of my posts and pages. JS libraries can scale easily you can optimize hundreds of images with just a few lines of code at -almost- no cost.</p>



<p>There are many JS libraries for optimizing images out there but we will focus on <strong><em>Imagemin </em></strong>which is the most popular and used, Imagemin is open source JavaScript Library and easy to use, and with great documentation.</p>



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



<p><strong><em>Imagemin </em></strong>requires Node.js to be installed on your Operating System, which you can download below. ( I recommend downloading and installing the stable version for your operating system ).</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button alignleft"><a class="wp-block-button__link" href="https://nodejs.org/en/download/" style="border-radius:0px" target="_blank" rel="noreferrer noopener">Download Node</a></div>
</div>



<h2 class="wp-block-heading">Imagemin</h2>



<p><strong><em>Imagemin </em></strong>package is a great choice for optimizing your images, with a simple script you can crop, resize, and compress your images to reduce the size of images, reducing webpages size.</p>



<p>Using <strong><em>Imagemin </em></strong>package is very straightforward and simple, you can go through its documentation and available options <a href="https://github.com/imagemin/imagemin" target="_blank" rel="noreferrer noopener nofollow">here</a>.</p>



<p>The first step to using Imagemin after installing Node.js is to install the packages that we are going to use.</p>



<p>Now, create a Folder for optimizing images. </p>



<p>Open your command line terminal in this folder, -I use <a href="https://git-scm.com/downloads" target="_blank" rel="noreferrer noopener nofollow">Gitbash</a>&#8211; then run the following command</p>



<div class="hcb_wrap"><pre class="prism off-numbers lang-bash" data-lang="Bash" data-show-lang="1"><code>npm install imagemin imageminJpegtran imageminPngquant imageminWebp</code></pre></div>



<p>Or you can replace npm install with yarn add if you have yarn in your system.</p>



<div class="hcb_wrap"><pre class="prism off-numbers lang-bash" data-lang="Bash" data-show-lang="1"><code>yarn add imagemin imageminJpegtran imageminPngquant imageminWebp</code></pre></div>



<p>It will take a minute to finish installing the packages, and there should be [<strong>node_modules</strong>]folder.</p>



<p>Now we will create a file (<strong><em>index.mjs</em></strong>) to write up our code for optimizing images.</p>



<p>1- Include the packages</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript" data-show-lang="1"><code>import  imagemin from &#39;imagemin&#39;;
import  imageminJpegtran from &#39;imagemin-jpegtran&#39;;
import  imageminPngquant from &#39;imagemin-pngquant&#39;;
import imageminWebp from &#39;imagemin-webp&#39;;</code></pre></div>



<p>2- Add code for optimizing the images</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript" data-show-lang="1"><code>(async () =&gt; {
	const files =  await imagemin([&#39;images/*.{jpg,png}&#39;], {
		destination: &#39;output&#39;,
		plugins: [
			imageminWebp(
				{
					quality: 80,
				}
			)
		]
	});

    console.log(files);
    console.log(&#39;Images optimized&#39;);
})();
</code></pre></div>



<p>3- Create a folder inside the same directory named (<strong><em>images</em></strong>) which will include your original images.</p>



<p>4- Save the file and then from the terminal run the following command</p>



<div class="hcb_wrap"><pre class="prism off-numbers lang-bash" data-lang="Bash" data-show-lang="1"><code>node index.mjs</code></pre></div>



<p>5- New folder named (<strong><em>output</em></strong>) should appear -as per our code you can change it from the <strong>destination </strong>&#8211; containing the optimized images which will be formatted <strong>WebP</strong>.</p>



<p>If you want to use the Code we use for our optimizing Image on Imagemin you can find the code <a href="https://github.com/mohammedrezq/wadi-imagemin" target="_blank" rel="noreferrer noopener nofollow">here</a>.</p>



<h2 class="wp-block-heading">Testing Optimizing Images</h2>



<p>Now that you&#8217;re familiar with how to optimize images using <strong>Imagemin</strong>. I will display some results Before and After optimizing my images on one of my pages.</p>



<p><a href="https://www.wadiweb.com/wadi-gallery-grid-widget-for-elementor/" target="_blank" rel="noreferrer noopener"><strong>Wadi Gallery Grid for Elementor Page</strong></a> is basically a page full of images and videos so having optimized images is a necessity.</p>



<h2 class="wp-block-heading">Before Optimizing Images Results</h2>



<p>Using tools.pingdom.com here are the page results <strong>before</strong> images optimization</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://cdn.wadiweb.com/wp-content/uploads/2022/09/10074847/wadi-gallery-grid-pingdom-results-1.webp" alt="" class="wp-image-3638"/><figcaption>Gallery Grid Page Results</figcaption></figure>



<p>Page size is 11.3 MB and Load time is 3.37 seconds.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="687" height="339" src="https://cdn.wadiweb.com/wp-content/uploads/2022/09/10074821/wadi-content-size-by-content-type.webp" alt="" class="wp-image-3636" srcset="https://cdn.wadiweb.com/wp-content/uploads/2022/09/10074821/wadi-content-size-by-content-type.webp 687w, https://cdn.wadiweb.com/wp-content/uploads/2022/09/10074821/wadi-content-size-by-content-type-300x148.webp 300w" sizes="(max-width: 687px) 100vw, 687px" /><figcaption>Content size by content type</figcaption></figure>



<p>Images size takes the lion&#8217;s share of the page size more than 90% percent of page size is images!. Images take 10.2 MB of the total page size. That is why image optimization is necessary for any modern website that relies on images to create appealing web pages.</p>



<h2 class="wp-block-heading">After Optimizing Image Results</h2>



<p>Now <strong>after </strong>doing the images optimization process using Imagemin and covert all images to WebP format here are the results</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="961" height="419" src="https://cdn.wadiweb.com/wp-content/uploads/2022/09/10083059/wadi-gallery-grid-pingdom-results-after.webp" alt="" class="wp-image-3736" srcset="https://cdn.wadiweb.com/wp-content/uploads/2022/09/10083059/wadi-gallery-grid-pingdom-results-after.webp 961w, https://cdn.wadiweb.com/wp-content/uploads/2022/09/10083059/wadi-gallery-grid-pingdom-results-after-300x131.webp 300w, https://cdn.wadiweb.com/wp-content/uploads/2022/09/10083059/wadi-gallery-grid-pingdom-results-after-768x335.webp 768w" sizes="(max-width: 961px) 100vw, 961px" /><figcaption>Gallery Grid Page Results After</figcaption></figure>



<p>As you can see the web page size dropped from 10.2 MB to 3.6 MB by just doing image optimization which doesn&#8217;t take more than 5 minutes after the initial setup of <strong><em>Imagemin</em></strong>!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="696" height="300" src="https://cdn.wadiweb.com/wp-content/uploads/2022/09/10083057/wadi-content-size-by-content-type-after.webp" alt="" class="wp-image-3735" srcset="https://cdn.wadiweb.com/wp-content/uploads/2022/09/10083057/wadi-content-size-by-content-type-after.webp 696w, https://cdn.wadiweb.com/wp-content/uploads/2022/09/10083057/wadi-content-size-by-content-type-after-300x129.webp 300w" sizes="(max-width: 696px) 100vw, 696px" /><figcaption>Content size by content type After</figcaption></figure>



<p>Images now take about 72% of the web page size from more than 90% of the page size before images optimization &#8211; considering that Gallery Grid for Elementor demo page is a gallery for media images and videos I think it is very reasonable- that is a good improvement on a web page.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>As you can see, image optimization for web pages is a necessity for every aspect of your website, whether to have a faster page for your users or better SEO that will help your web pages to rank on Search.</p>
<p>The post <a href="https://www.wadiweb.com/how-to-optimizie-images-for-your-website/">How to Optimize Images For Your Website</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Wadi Addons For Elementor Page Builder</title>
		<link>https://www.wadiweb.com/wadi-addons-for-elementor-page-builder/</link>
		
		<dc:creator><![CDATA[Mohammed Rezq]]></dc:creator>
		<pubDate>Mon, 18 Apr 2022 15:51:41 +0000</pubDate>
				<category><![CDATA[Elementor]]></category>
		<category><![CDATA[Wadi Addons For Elementor]]></category>
		<category><![CDATA[Widget]]></category>
		<guid isPermaLink="false">https://www.wadiweb.com/?p=1069</guid>

					<description><![CDATA[<p>About a month ago, Wadi Addons For Elementor Page Builder was released. The initial release of Wadi Addons For Elementor was about 11 widgets for Elementor, but now it is 14 widgets &#8211; we have added three new Elementor widgets since we released plugin. Currently we are working on adding new Widgets and enhancing the...</p>
<p>The post <a href="https://www.wadiweb.com/wadi-addons-for-elementor-page-builder/">Wadi Addons For Elementor Page Builder</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>About a month ago, <a href="https://wordpress.org/plugins/wadi-addons-for-elementor/" target="_blank" rel="noreferrer noopener">Wadi Addons For Elementor Page Builder</a> was released.</p>



<p>The initial release of Wadi Addons For Elementor was about 11 widgets for Elementor, but now it is 14 widgets &#8211; we have added three new Elementor widgets since we released plugin.</p>



<p>Currently we are working on adding new Widgets and enhancing the existing ones. Also creating demo pages for each of widgets, and also providing documentation and videos for each Elementor Widget we add to make it easier to navigate through widgets features and available options.</p>



<p><a href="https://www.wadiweb.com/wadi-addons/wadi-carousel-widget-for-elementor/" target="_blank" rel="noreferrer noopener">Wadi Carousel For Elementor Page Builder</a> is the first demo page we have designed, but soon all widgets will have their own demo pages.</p>



<p>If you have installed the plugin and used it please let us know what you think. We would love to hear your feedback.</p>



<p> </p>
<p>The post <a href="https://www.wadiweb.com/wadi-addons-for-elementor-page-builder/">Wadi Addons For Elementor Page Builder</a> appeared first on <a href="https://www.wadiweb.com">Wadiweb</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
