One of the major aspects of optimizing your application or website for search engines is the use of properly sized images for their practical use.
For example, if your blog displays images in 300 × 200 format and the article alone displays the image in 1200 × 500 format, search engines expect the physical images to be in these formats, this is partly how these images are considered optimized (the size in relation to the file format also influences).
However, when your application displays images provided by users, it can be complicated to create processes for resizing and optimizing these files, which is why it may be wise to call on an external data processing service. files.
In 2020, we created an online image file processing service that can allow you to perform normally complex operations in a simplified way, we will analyze how to integrate this service into your Laravel application.
ZMD is an online image processing service on demand, by integrating a few instructions into your HTML code you can perform operations such as:
See the list of available operations: https://zmd.io.
Create an account
Start by creating an account free for 10 days without credit card and without commitment: https://app.zmd.io/register
Add a domain
To use the ZMD service you must enter from which domain name you are going to work, this domain must be physically accessible to be able to function, register your domains here: https://app.zmd.io/domains
We have created a composer package to simplify the use of the zmd.io service, for that simply install the package with the following command:
composer require superlative / zmd-laravel
HTML / Blade integration
In your HTML / Blade template, insert the code below just before closing the tag