Category: Technical

Back to blog
Sometimes You Don't Need A Dependency

Sometimes You Don't Need A Dependency

When developing new features it is all too easy to go immediately to packagist.org and see if that wheel has already been invented. Most of the time this is the right approach. We don't need new...

Read more

Completely Hiding The Wordpress Version Is Hard

Completely Hiding The Wordpress Version Is Hard

We develop and maintain a couple of WordPress sites. There are a number of things we will do as standard to secure each site. One of these is running WPScan. It checks for all kinds of things but...

Read more

Automatically Find The Best Image Compression

Automatically Find The Best Image Compression

Recently I was tweaking the default quality values used to compress images on one of our sites. The quality value is a number between 0 and 100. 100 produces a large file size and has high...

Read more

Data Transfer Objects In PHP 8

Data Transfer Objects In PHP 8

Data transfer objects (DTOs for short) are simple PHP classes which have one job: Store some data. Until recently the spatie/data-transfer-object package was our go-to when creating DTOs. This...

Read more

Image Compression For High DPR Images

Image Compression For High DPR Images

Images typically account for 40% of the size of a webpage. This makes them a key thing to look at when optimising a site. Image optimisation typically involves resizing and compressing it to be as...

Read more

Storing Multi Currency Prices In Laravel

Storing Multi Currency Prices In Laravel

Recently I was involved with building a new module for our internal Intranet. It is responsible for storing all the details of our subscriptions; name, start/end dates, price, notes... All simple...

Read more

Image Focal Point Auto Detection

Image Focal Point Auto Detection

A recent trend with CMSes is to do focal point based media cropping. Traditionally an image is uploaded and then is cropped/scaled to the required size, eg a thumbnail. The problem is that crops...

Read more

Google Translate Vs CSP. Fight!

Google Translate Vs CSP. Fight!

Recently we were asked to implement a Content Security Policy (CSP) onto an existing site. The process of retro fitting CSP goes something like this: Put in a restrictive policy Test the...

Read more

How To Generate AVIF Images In PHP Today

How To Generate AVIF Images In PHP Today

The AVIF image format is a really exciting, it promises much higher compression without any noticeable loss of quality and is supported in most of the major browsers. If you want all the nitty...

Read more

Adding Variable CSP Nonces To Static Sites

Adding Variable CSP Nonces To Static Sites

We build all different sized sites, some call for a full blown CMS but others are more suited to a static approach. These static sites come with some unique problems when it comes to CSP and...

Read more

Incrementally Copying (Rsyncing) Files From A Kubernetes Pod

Incrementally Copying (Rsyncing) Files From A Kubernetes Pod

The most obvious choice for moving files in and out of containers is kubectl cp but it just does a straight copy of all the bytes. If you want to backup just a few changed bytes out of several...

Read more

Why You Should Always Give Lazily Loaded Images A Width & Height

Why You Should Always Give Lazily Loaded Images A Width & Height

When images are set to load lazily they will only be downloaded when they come into view but what counts as "in view"? It seems Google Chrome only takes the vertical scroll position into account...

Read more

Persisting Data Between Steps In BitBucket Pipeline Builds

Persisting Data Between Steps In BitBucket Pipeline Builds

When using a build pipeline it is common to create some kind of value, like a path, container ID, auth token etc in one step which is then needed in a subsequent step but the whole point of steps...

Read more

Hunting For Zombie Pods

Hunting For Zombie Pods

At almost exactly 0300 (UTC) on the morning of 22/05 our monitoring systems started sending alerts for a handful of websites. They had begun to respond slower. This was very strange, the sites...

Read more

Satis Queue Worker

Satis Queue Worker

As part of a recent server migration we had to move a Satis instance. The server it was being moved from was a baremetal server, the server it was going to was a Kubernetes cluster, quite...

Read more