PHP Replace images with GD Resampled Images library in Joomla

I'm a tech trainee for an independent online newspaper, and the writers on staff are not tech savvy. They don't quite understand how web pages work, and often they download and include images directly from their digital cameras or scanned from original media. These images become a burden when the first page has 10 images on each 3.5 MB page.

We are trying to develop some kind of training method to teach them how to modify and optimize the images they want to include in their articles, but as I said, they are not very technologically advanced, and any method that we try employers can go over their heads ...

So, I wanted to know if it is impractical to try to reprogram and cache images that are included in articles using a PHP function and the GD library to stream the amount of data to be transferred per article.

I think this is possible, I am just trying to figure out if it is worth the time and effort to prepare the authors, or if creating an automated process would be better.

+1


source to share


3 answers


You are better off handling GD image handling during the loading process. GD can be quite resource intensive, so processing every image on every request would not be the preferred solution. If you are unable to do this during the upload process, you must cache all re-selected images and use them if / when available.



+2


source


Of course it is possible, and I would be very surprised if Joomla! has no modules that do exactly that.



+1


source


With the current website I'm working on, I needed to answer a similar question. I chose to use the joomla addon Easy Gallery . Two things that stand out for me are the automatic thumbnail creation and the image resizing feature. Dimensions are configured on the component configuration page. You will have a thumbnail, resized image, and original image with every upload.

This component is a Joomla 1.0 component, so if you are using a Joomla 1.5 installation, you need to enable legacy mode. Work seems to be ongoing for the native version 1.5.

I also found a couple of places where the generated thumbnails were not showing. I raised a question on the Easy Gallery forum and I was able to work out the answer for myself.

0


source







All Articles