Hi, Folks! The BlogEngine.NET Team just released a new version of their CMS, tagged as 3.3.5, and I decided to fork the official github repository and add some features I coded into the platform over the time, so others could use them as well. This website uses a modified ImageHandler from the BlogEngine, allowing me to scale images and choose what size I want the image to be scaled in.
Find the github repository here. But read all details from this post before updating your web application.
I had the idea for the image handler when adding heavy screenshots to blog posts and tutorials and opening them in a smartphone without WIFI access. Without it, those images usually took a lot of time to load. Basically, there's 4 options for image scaling:
- Large (images will be resized to 900px wide);
- Medium (600px wide);
- Small (200px wide);
- and Thumbnail (50px wide).
An MD5 hash is generated based on the original file fullpath and it will be used to name the scaled file into a directory called scaling under the files directory (App_Data) along with its size (large, medium, small or thumbnail).
OK, scaling is one part of the problem. How can my readers expand the image?
To solve that issue, I added a plugin called YoxView (unfortunately the official website is down) that enables someone to click on the image and a lightbox will bring out the original image.
As you can see from the image above, only a thumbnail of the original picture is shown, but if you want to see more details, you can click on it.
In the admin pages, I modified the File Manager so one can choose which size the image will be shown initially.
This' interesting... where can I get the source-code and try it?
You will find the source-code in this link (a branch called morefeatures from my own github). A heads-up though: if you decide to use my version of the BlogEngine, you couldn't upgrade the platform directly from the admin dashboard. Otherwise, the DLLs will be replaced and you would loose the scaling feature.
By using this modified version, you will have to wait when a new official version is released.
And this is it for now! Enjoy...