WordPress and images

I have been wanting to look into WordPress and images for a while now. One of the reasons is that I run a webcomic and the other reason is that I am wondering what to do with my photos from travels. I seriously want to process those picture in one way or another.

Responsive images

Before version 4.4 there was a plugin which handled responsive images, RICG Responsive Images. At the back of my mind I was aware of it but didn’t find time or space to use it somewhere. As of version 4.4 generates several versions of the image.

Personally I prefer <picture> element because in my view it is cleaner than using scrset attribute on <img> element. But if it works, I won’t protest against it much. There are many ways to the desired result.

At default WordPress generates the sizes according to some predefined set of sizes defined by the Core developers. But theme developers are able to override it, except for very large images – there’s an upper limit.

When I compare code on my blog and on my webcomic, I still think that picture is cleaner but WordPress’ way makes some sense and probably saves time.

Alt text

Another thing I was hoping that I will see is some alt text in the code generated by WordPress. My webcomic lacks that and I need to fix that at latest when I’ll be migrating to a different web host next month. It’s not perfect, I wish that I could add alt attribute when I am uploading.

It seems that at least in Twenty Sixteen defining a separate alt attribute in Media library won’t work for thumbnail images. I will put this on my list of this to look at when I will be deep in WordPress development again and I might write a plug-in for that.

Sources:

Responsive Images in WordPress 4.4