Skip to main content

Reshaping and resizing image files in Magento 2

· 3 min read

In this article, I will show you how to reshape/resize image files in Magento 2. We are going to turn an image into a square, by adding a white background to the smaller dimension of the image. That is, the rectangle image will turn into a square, where the smaller dimension of the image will be extended with a white background. Afterwards, we will save the resized image to a custom location. This way we will have two copies of the image - the original one and the resized one.

Magento 2.2 benchmark

· 5 min read

Few weeks ago, one of our customers asked to benchmark one of our extensions. To do that, we first needed to perform a benchmark on a clean Magento installation – we chose Magento 2.2.4.

We created our benchmark test using Apache Jmeter. Jmeter is a very handy tool to perform benchmarks and load tests. It is very easy to create a test with Jmeter – it has a recorder tool that lets you record your test by listening to a browser. After recording the test, the Jmeter lets you run it and choose the load of your test (the “Ramp-up Period” and “Number of Threads” – those definitions are explained later on in the article).