WordPress Lies About Image Sizes / Dimensions
There are a few WordPress functions available to retrieve the URL and size of an image, but few people know that WordPress will often lie about an image’s dimensions.
There are a few WordPress functions available to retrieve the URL and size of an image, but few people know that WordPress will often lie about an image’s dimensions.
I’ve been using Freshdesk for a week or two now. I found a way to make custom ticket fields clickable, so I can quickly visit a customer’s website and lookup information using a WordPress plugin.
Here is my solution to maintaining Development, Staging, and Production apt mirrors on a “deployment” server with Puppet.
A little snippet I use to remove multiarch / i386 support from Ubuntu with Puppet.
To manage multiple instances of mongodb, I had to breakup the mongodb upstart script into two — one master to define the instances, and another to start each one independently.
If you have a server with multiple interfaces – either public and/or private – your routing table might cause traffic to be routed out the wrong interface. If you have two public interfaces, from two different network providers, you need to create two distinct routing tables. This script makes that job easier by automating the process for one or more servers in your network.
I’ve found a few snippets of PHP code to read XMP / XML meta data from an image file, but none that I would call very robust or efficient. I ended up writing my own for Underwater Focus, and I’m quite pleased with the result. In fact, after adding support for a shortcode, I packaged it as an Adobe XMP plugin for WordPress.
Continuing the earlier theme of “Optimizing Images to Save Bandwidth and Speed Page Load”, you can also encode small (background) images directly in your stylesheets. For each image / page element encoded within a stylesheet, it means one less HTTP connection for content, which in turn means pages finish loading faster.