1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Image compression / optimization google speed test

Discussion in 'Media Gallery Support' started by sinucello, Mar 6, 2015.

  1. sinucello

    sinucello Well-Known Member

    the google page speed tests complains about the latest media block on my forum home. The images aren`t compressed (enough).

    In the kraken add-on thread someone mentioned server tools like optipng / jpgoptim:

    But it seems that the xF attachment system gets confused when the image size changes.

    Is there any way to improve the image sizes of a large existing gallery without destroying the existing image relations?

    And how can I optimize the images right when they are uploaded? Is this possible with the kraken add-on or can the gallery do that?

    If the gallery creates thumbnails for the media-block, will those thumbnails also automatically be optimized?

    Thank you - all the best,
  2. Chris D

    Chris D XenForo Developer Staff Member

    I can't comment on third party add-ons.

    In the short term, the jpg compression for thumbnails is set to 100, I'm going to look at reducing that down to 90, which may help.

    Longer term, we may look at storing multiple resolutions of thumbnails. Currently the thumbnails on the media block are the same as the ones used elsewhere, so, by default, 300x 300 px.
    Gossipy likes this.
  3. sinucello

    sinucello Well-Known Member

    OK, but this question:
    is not related to any add-on. If I change the size of an image directly on the server (e.g. using optipng / jpgoptim), will xF or XFMG have a problem with that? I read somewhere that the original size is stored in the DB and if the optimized image has a different size, this will produce bad results. If xF could handle this, I`d just set up a cronjob for those server-side image optimizers.

    Yes, that makes sense. In the TYPO3 CMS every instance of an image can have a different size and quality. You can define a default quality level for imageMagick/graphicsMagick operations but you can also enter seperate settings for each image object.

  4. Chris D

    Chris D XenForo Developer Staff Member

    The content headers we send do look at the size stored in the database and so some browsers will definitely struggle if they start receiving a file that is larger or smaller than expected. Though this shouldn't effect thumbnails, only the main images themselves.

    If you do some server side processing on the thumbnails I would expect that to work fine.
  5. Coop1979

    Coop1979 Well-Known Member

    @Sacha - I remember when I last ran an image optimization on my server, I had to rebuild my attachment thumbnails. I don't remember any problems other than that.

    I run my image quality at 85 and never have any complaints.
  6. sinucello

    sinucello Well-Known Member

    @Chris D @Coop1979 thanks, I`ll try it with server side batch thumbnail optimization then.
  7. Recep Baltaş

    Recep Baltaş Well-Known Member

    I really need that too. I have 1 MB limit but that is also creating a lot of load on the server. I really need to batch compress imgaes.

Share This Page