Newsfeed

An example of NAT routing in docker-compose

This is an example of setting up a NAT inside docker - in a fairly self-explanatory and minimal way. There are three examples that you can run in this setup: a positive example, a negative example, and a chatty positive example for debugging and demonstration purposes.

Utilities: Resizing and scaling images in python. And a filename-insensitive data loader.

I recently wrote this utility... a mere function, really, to resize and scale a python image at the center. This way, I don't have to worry about how my images are being fed into an AI pipeline, if they all get scaled and cropped the same.

Additionally, while previously I used bash to rename files in a folder to sequential names such as 1.jpg , the current implementation ignores filenames, which saves me time when massaging the data.

[FIXED]: Error: Call to a member function transformDimensions() on null in core/modules/ image/image.module

The issue stems from the preview being in an undefined style.

1. Go to configuration -> image styles and review the styles available. I have a style called "200x200 thumb".

2. After adding an image field to a content type, go to manage form display, expand the display of the image, and specify an existing style from step 1 as the preview style.

After taking these steps, the page for adding/editing this content type should render correctly.