If you insert an image into a Worpress post, it sets by default width and height. Sometime you need to autosize images at runtime how you can achieve this?
- Remove while you are posting the width and height attributes from the image tag (this sets the image size as it is really)
- Resize tag image dynamically using CCS
width: expression(this.width > 460 ? 460: true);
This allows you to have auto sized images, but there is a problem… What happens to the old posts? We need to edit all the old posts manually?
You can avoid this activity by introducing a new custom function in your function.php file.
- Edit function.php and define a new function like this
return preg_replace('/\<(.*?)(width="(.*?)")(.*?)(height="(.*?)")(.*?)\>/i', '<$1$4$7>',$string);
- Modify your theme calling this function in your page.php and index.php before writing the post_content.
Checking my blog performance I noticed that after the theme upgrade gzip compression is no longer active.
I will give you a easy tutorial in order to enable gzip compression without the installation of any plugins (like cache, super cache and so on) that I really hate.
Continue reading “Enable Gzip compression in WordPress (and not only)”
if you tried to access to the blog today, you would notice that it was on maintenance.
After few hours of rework I finally reimplemented the WordPress 3.0 installation in order to activate Multi-site functionality using the old url pattern.
Thanks for your understanding.
today we successfully upgraded to WordPress 2.8, if you find any error or inconsistence please contact me.
I’m proud to present you the new Plinky Blog, yesterday we moved to a no-free domain and also upgraded to Worpress 4.7 and Librio 1.0.
Many news are coming, stay tuned!!!
See you very soon again on WWW.PLINKY.IT.