Improving WordPress: my personal feature list

This post is gathering some raw notes regarding issues that I would love to see improved in WordPress. Mostly minor things, but the addition of them can help making our everyday lives better.

This list is going to move and expand. When I will be motivated enough, some of those issues may be turned into a patch, or a detailed feature request, and move over to Trac (the place where the WordPress codebase gets improved every day).

[has-patch] Attachments in filenames should be sanitized

Update (2013-07-24): Thanks to Thomas Boggini’s work on this issue, there’s now a working patch on Trac.

This is hitting my French-speaking customers every now and then. WordPress isn’t replacing accented characters in filenames ( does, but a clean WP install doesn’t). Therefore, if uploading an image named “Capture d’écran 2013-03-30 à 11.35.10-1.png” (yes, that’s how OSX names your screen captures by default, if your system language is French), the link will break in some browsers – more precisely, in Safari, on OSX and iOS. No iPhone or iPad will be able to display the picture.

The tricky part is: the issue depends also from the OS and the browser through which the file upload happens, which makes it complicated to troubleshoot. In some cases the “é” will be ok, but in other cases the “é” will be a “combined glpyh”, and things will break. I opened a ticket here but it’s such a fringe case that it may be ignored for ages. For now, I will continue to tell my customers to replace accented chars in filenames – but honestly, rather than patronizing people, I would prefer to fix the system.

Some reactions:

[solved by plugin] Let us show Custom Taxonomies in the Post overview

The post overview table shows titles, categories, tags… When we add custom taxonomies to WordPress – which is done with a simple and elegant function, register_taxonomy() – it would be logical to display them in the overview. This isn’t provided by default, so you have to write custom code.

One solution, that I used on many sites, was a code snippet written by SEO rockstar Joost de Valk in 2011. Unfortunately, that custom code is broken in the current version of WordPress, and triggers other issues (which caused me to write a bogus bug report here).

I think this feature should be in core. It’s part of basic support for custom taxonomies, which exists since 2007 (WP 2.3). On the post overview page, we could have some check boxes in the Screen Options panel, that would allow us to toggle the visibility of our custom taxonomies.

Some reactions:

Update (2013-07-24):
There’s a great plugin for that, Codepress Admin Columns.

Image galleries should link to File by default

When you create a new WordPress site, the first time you insert a Gallery into a Post, the default target setting is “Link to Attachment Page”. This is a bad choice imho. Attachment pages are not very useful, in the age where solutions like Jetpack Carousel or Colorbox are commonplace. The attachment page leads to poor usability, and has bad SEO implications.

Or to say it with the words of Andrew Nacin :

“Not to brush this use case off entirely, but I personally find attachment pages a waste that shouldn’t exist for 95% of users, and clicking through them one-by-one as a terrible experience. Carousels — which can support these custom galleries — are much better off.” (source)

If we consider that, for whatever reason, “Link to Attachment Page” should remain the default, then I beg for a simple way to change that default to “Link to Media File”, site-wide, for all users.

Currently, in lack of a more elegant method, I’m often rewriting the whole gallery function to make it always link to the file, and I hide the options in the admin, using custom CSS:

.media-sidebar label[data-setting="description"] {

.media-sidebar .attachment-display-settings {

Update (17.05.2013): there is actually a related bug in WP 3.5.1, there’s a ticket about this.

[Solved] Show a list of recently published Posts on the Dashboard

This is based on my personal usage: the WP Dashboard shows a couple of things I almost never use: QuickPress, Recent Drafts, WordPress Blog, Plugins.

However, it doesn’t facilitate my most frequent action: going back to a published Post, and changing some detail. For that, I need to go from the Dashboard to the Posts overview, and from there to the editor. It’s by far my most frequent action. I would love to have a simple Dashboard item that would list my five most recent posts – it would speed up my most frequent action by 2x.

Update: found a simple piece of code that creates such a dashboard widget:

Friends don’t let friends upload TIFFs!

This is another common mistake that has burned nearly each of my customers. As incredible as it may sound, some people do not know that JPG, PNG and GIF are suitable for being displayed on the web, while TIFF and BMP aren’t. The problem: WordPress by default won’t complain if the user uploads such a file. But it won’t generate thumbnails, and won’t display them in a gallery.

To avoid such a tricky situation, it’s much better to remove those formats from the whitelist. So WordPress will let the user know this format isn’t welcome.

What you can do quite easily, is to add a filter that re-defines the list of accepted file formats. But this forces you to re-list the whole lot of possible document formats. Instead, it would be more elegant if we could tell WP to blacklist those two formats, TIFF and BMP.

Actually, I think it would be a smart move to disallow them by default. I’m sure that in 80% of the cases, those formats are uploaded mistakenly, by users unaware of the intricacies of image compression.

UPDATE: During the recent WordPress-Hackathon at Bureau Culturel, Evren Kiefer came across this solution, which I have to check out…

Define different compression levels for various image sizes

WordPress has the fantastic ability of creating different sizes of each image that you upload. That’s a great feature, that gives a lot of flexibility. However, all the images are compressed using the same quality setting, which is set at 90/100. It would be really sweet if we could define different quality settings for different sizes.

For instance, for a small thumbnail, you want a high quality setting. Otherwise it will quickly look pixelized.

But with retina screens in mind, it can be a good strategy to have a large pixel count, but to apply stronger compression levels. In order to do that, the

add_image_size( $name, $width, $height, $crop )

function should allow one more setting, $quality.