imageOptimizer

xso

After installing imageOptimizer two other modules do not work anymore:

Contactlist ( http://www.websitebakers.com/pages/modules/listings/various/contactlist.php ) gives the message blow:

Fatal error: Cannot redeclare editadressbackend() (previously declared in C:\xampp\htdocs\modules\contactlist\functions.php:35) in C:\xampp\htdocs\modules\contactlist\functions.php on line 260

and

GDpics (http://www.websitebakers.com/pages/modules/image-galleries/gdpics-image-gallery.php?searchresult=1&sstring=gdpics)

gives only blank pages.


Uninstalling ImageOptimizer makes them working again.

regards,

Rinse



Ralf Hertsch

Hello,

I've just released imageOptimizer 0.18 (stable).

0.18 - 2008-12-14 (STABLE)
       * fixed: ignored error while getting image size
       * fixed: try to optimize images outside the own webspace
       * fixed: debugging mode was true by default
       * added: switch to turn imageOptimizer on/off

0.17 - 2008-12-13 (STABLE)
       * added: check for the MySQL version
       * changed: changed datatypes for compatibility with MySQL 4.x

0.16 - 2008-12-11 (STABLE)
       * fixed: problem with umlauts within the title and/or alt tags

Download: imageOptimizer

Regards
Ralf

Ralf Hertsch

#18
Hello,

I've just released imageOptimizer 0.15 (stable).


  • added: "babble mode" insert a small info bar at the end of each page to show how many images are optimized and how many traffic is saved (may be switched on/off)
  • fixed: encoding spaces within filenames

Download: imageOptimizer

Requirements: imageOptimizer needs at minimum PHP 5.x, installed rhTools 0.41 and dbConnect 0.29

After installing dbConnect, rhTools and imageOptimizer please edit the template of your website and replace page_content(); with:

if (class_exists('imageOptimizer')) {
  ob_start();
  page_content();
  $content = ob_get_contents();
  ob_end_clean();
  image_optimize($page_id, $content);
}
else {
  page_content();
}


Because the imageOptimizer is a snippet you dont have access to it by the backend. To get access to the administration of the imageOptimizer please create a new private page of type code and insert the following code:

if (class_exists('imageOptimizerControl')) {
  image_optimizer_control($page_id);
}
else {
  echo "imageOptimizerControl is not installed!";
}


The following screenshot shows the "babble mode":



This screenshot shows how effective the imageOptimizer is working at panke.info:



All error reports an suggestions for improvements are always welcome!

Regards
Ralf

Argos

Seems to work now :-)

Great snippet!
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Ralf Hertsch

Quote from: Argos on November 30, 2008, 09:02:17 PM
No no sorry, I didn't mean the single image on that page, but the complete galleries there under.

This problem is fixed - it was a problem with whitespaces within the image names. Please check panke.info again, hope you will not find any other problems  :-D

Regards
Ralf

Ralf Hertsch


QuoteNo no sorry, I didn't mean the single image on that page, but the complete galleries there under.

Indeed the imageOptimizer should be able to optimze these pictures - at the moment I have no idea why it does not work there...

Regards
Ralf

Argos

Quote from: Ralf (Berlin) on November 30, 2008, 08:36:02 PM

QuoteI only visited the section "Fotografien":  http://panke.info/pages/fotografien/der-verlauf-der-panke.php?dir13=

ok - this image is a png with transparency and big, but the imageOptimizer dont touch it...  :-D

No no sorry, I didn't mean the single image on that page, but the complete galleries there under.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Ralf Hertsch


QuoteI only visited the section "Fotografien":  http://panke.info/pages/fotografien/der-verlauf-der-panke.php?dir13=

ok - this image is a png with transparency and big, but the imageOptimizer dont touch it...  :-D

QuoteEdit: Ah, I have detect what you mean: it seem that the imageOptimizer have a problem with some images, for example at Flussbeschreibungen - at this page are optimized images but also a big, not optimized image: D1%20Lietzengraben%20CS.jpg. I must check the reason for this behaviour - perhaps the whitespaces...

This problem seems to be caused by the ownership of this image (was not accessible for the imageOptimizer).

Regards
Ralf

Argos

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Ralf Hertsch

#11
Hello Argos,

Quotewhat are the image settings you use on panke.info? I only see a lot of very large images...

There are also with use of the imageOptimizer some large images (i.e. at the start pages of the sub portals) - imageOptimizer dont touch images which are not resized...

Which pages/images do you mean exactly?

Edit: Ah, I have detect what you mean: it seem that the imageOptimizer have a problem with some images, for example at Flussbeschreibungen - at this page are optimized images but also a big, not optimized image: D1%20Lietzengraben%20CS.jpg. I must check the reason for this behaviour - perhaps the whitespaces...

Regards
Ralf

Argos

Quote from: Ralf (Berlin) on November 30, 2008, 07:27:03 PM
panke.info is a local portal, where everyone who is allowed to publish articles take his own images directly from his digital camera an place it within the articles.

Hi Ralf,

what are the image settings you use on panke.info? I only see a lot of very large images...
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Ralf Hertsch

panke.info is a local portal, where everyone who is allowed to publish articles take his own images directly from his digital camera an place it within the articles. The following statistic screenshot shows, how effective the imageOptimizer is working:



There is nothing sugarcoated or so...

Regards
Ralf

Ralf Hertsch

#8
Hello,

Release 0.13 of imageOptimizer is ready.

This version is complete and should be the last beta if there are no errors...

This release add a control center with statistic informations and tools. The statistic informations are very helpful to see how effective the imageOptimizer work and how much traffic you are saving - the tools help you to keep the imageOptimizer up to date.

You need to upgrade the attached dbConnect and rhTools before upgrading the imageOptimizer.

Regards
Ralf


Ralf Hertsch

QuoteVery nice and welcome function!!

Thank you  8-)

QuoteI can't wait for my new server in January, that has PHP5. Must do with PHP4 for a little time...

There is absolutly no chance to get imageOptimizer working with PHP4 ...  :-(

Regards
Ralf

Argos

Very nice and welcome function!! I can't wait for my new server in January, that has PHP5. Must do with PHP4 for a little time...
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Ralf Hertsch

#5
Hello,

release 0.12 of imageOptimizer is ready, with the following changes:


  • added: configuration control dialog
  • added: option to switch debugging mode on/off
  • added: option to encrease memory usage if necessary
  • changed php requirements to php 5.x

Important:

The initializing method for imageOptimizer has changed, please use this code in your template:

if (class_exists('imageOptimizer')) {
  ob_start();
    page_content();
    $content = ob_get_contents();
  ob_end_clean();
  image_optimize($page_id, $content);
}
else {
  page_content();
}


Because imageOptimizer is a code snippet there exists no access to the configuration via backend. To access the configuration dialog create a new page of type code and insert the following code:

if (class_exists('imageOptimizerControl')) {
  image_optimizer_control($page_id);
}
else {
  echo "imageOptimizerControl not found!";
}


You should hide this page an give access only for yourself - anyway imageOptimizer check if the accessing user is logged in and member of the group administrators otherwise imageOptimizer denies access.

Requirements:

  • PHP 5.x
  • need the WB addon dbConnect (attached)
  • need the WB addon rhTools (attached)

Error reports an suggestions for improvements welcome!

Regards
Ralf

Ralf Hertsch

#4
Hello,

here is release 0.11 of imageOptimizer, with the following changes:


  • Bugfix: if <img> has no attributes for width and height imageOptimizer set image size to zero
  • Bugfix: imageOptimizer ignored percentual values for width and height
  • Added: imageOptimizer rewrite now the values for <img> attributes width and height if neccessary
  • Codecleanings, added comments

Error reports and suggestions for improvements welcome!

Regards
Ralf

-- Attached files removed, please look a newer post --

Ralf Hertsch

QuoteWow...great idea!

Thank you  8-)

QuoteSomething that should already be available in the the WYSIWYG editors!

I think it's the best way to parse page_content() because you will get the output of all modules (wysiwyg, news, manual a.s.o) and not only of one editor.

Regards
Ralf

marathoner

Wow...great idea! Something that should already be available in the the WYSIWYG editors! I'll test soon.

Ralf Hertsch

#1
imageOptimizer parse the page_content() and replaces all images which are resized only by the <img> attributes height and width with a new, physically adapted image.

I have wrote this tool because of the experience that most editors/writers take there images directly from any digital camera and bring them with help of TinyMCE or FCKEditor a.s.o to the wished format - which results in a horrible page performance for the visitors...

imageOptimizer supports JPG, GIF and PNG (also with transparency), reduce traffic and spends your visitors fast loading and lightweight pages  8-)

Requirements


  • PHP 5.2.x
  • need the WB Addon dbConnect (attached)

Setup

After installing dbConnect and imageOptimizer edit the template(s) of your site and replace page_content(); with the following code:

if (class_exists('imageOptimizer')) {
  ob_start();
    page_content();
    $content = ob_get_contents();
  ob_end_clean();
  image_optimize($content);
}
else {
  page_content();
}


imageOptimizer register all images of your website in a database and dont change any original images. If a image should be resized/optimized imageOptimizer create a new image, place it in his directory /MEDIA/optimized_images and replace the original image with the new one. By the next call to this page imageOptimizer uses directly the image from his directory.

Known Limits / Issues


  • missing configuration interface (phpMyAdmin only)
  • at the moment you can not exclude complete pages from parsing
  • imageOptimizer does not remove no longer needed files
  • is not tested with the various image galleries, may be there will be occur some difficulties
  • missing some statistic informations
  • ...

imageOptimizer is still ALPHA but fully functionally and I use it with best results at panke.info.

Please test it, report me any problem and make suggestions for improvements.

Regards
Ralf

-- Attached files removed, please look a newer post --