Learn about Centmin Mod LEMP Stack today
Register Now

Test thread (large image attachments)

Discussion in 'Testing Forum' started by Amin Sabet, Dec 5, 2016.

  1. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    9:40 AM
    Testing large images

    14925835253_501cbdb4a8_h.jpg

    15313809129_4b4050c1f7_h.jpg

    15313809719_95c39c685d_h.jpg

    15314138547_2ce7609360_h.jpg


    15334311839_8fda379ea3_h.jpg

    15359113229_b8aa067c19_h.jpg

    15468525846_ad3fab963d_h.jpg

    15477574406_54049596f5_h.jpg

    15491649435_577129bfd4_h.jpg

    15497565871_3a4c43d4df_h.jpg

    15498040086_60cd32fbf8_h.jpg
     
  2. Matt

    Matt Well-Known Member

    925
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    2:40 PM
    1.5.15
    MariaDB 10.2
    @eva2000 - are you using the XFRocks addon to serve images via the data folder?
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yup best way to make use of ngx_pagespeed for performance :D
     
  4. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    9:40 AM
    A few weird things happening here. Some of the images showed full size at first, then showed smaller after reloading page, then show as broken after reloading page again.
     
  5. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    9:40 AM
    I attached 11 images to the first post. Are they all showing for you?

    EDIT: After a few page refreshes, I see them.
     
  6. Matt

    Matt Well-Known Member

    925
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    2:40 PM
    1.5.15
    MariaDB 10.2
    @Amin Sabet doesn't and they still go through the permissions system (but uses the [Tinhte] Attach Image Optimization addon)
     
  7. Matt

    Matt Well-Known Member

    925
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    2:40 PM
    1.5.15
    MariaDB 10.2
    Yes, and after the first load, they are all optimized by pagespeed and converted to webp.
     
  8. Matt

    Matt Well-Known Member

    925
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    2:40 PM
    1.5.15
    MariaDB 10.2
    upload_2016-12-5_10-53-8.png
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ngx_pagespeed at work, it needs a few page reloads to optimise and auto convert images. I also set xfrocks addon to defer the data/ directory move actually i disabled that ages ago.
     
  10. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    9:40 AM
    Let's add a little more weight...

    14925835253_501cbdb4a8_h.jpg 15313809129_4b4050c1f7_h.jpg 15313809719_95c39c685d_h.jpg 15314138547_2ce7609360_h.jpg 15334311839_8fda379ea3_h.jpg 15359113229_b8aa067c19_h.jpg 15468525846_ad3fab963d_h.jpg 15477574406_54049596f5_h.jpg 15491649435_577129bfd4_h.jpg 15497565871_3a4c43d4df_h.jpg 15498040086_60cd32fbf8_h.jpg
     
  11. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    example from ngx_pagespeed message logs
    Code (Text):
    [Mon, 05 Dec 2016 10:56:08 GMT] [Info] [20517] threads/test-thread-large-image-attachments.9698/:5414: Shrinking image `data/attachment-files/2016/12/4811_14925835253_501cbdb4a8_h.jpg' (977320 bytes) to `data/attachment-files/2016/12/x4811_14925835253_501cbdb4a8_h.jpg.pagespeed.ic.leImc9kgKX.webp' (281996 bytes)
    [Mon, 05 Dec 2016 10:56:09 GMT] [Info] [20517] threads/test-thread-large-image-attachments.9698/:5418: Shrinking image `data/attachment-files/2016/12/4812_15313809129_4b4050c1f7_h.jpg' (622624 bytes) to `data/attachment-files/2016/12/x4812_15313809129_4b4050c1f7_h.jpg.pagespeed.ic.xRbiUeegmj.webp' (134010 bytes)
    [Mon, 05 Dec 2016 10:56:10 GMT] [Info] [20517] threads/test-thread-large-image-attachments.9698/:5422: Shrinking image `data/attachment-files/2016/12/4813_15313809719_95c39c685d_h.jpg' (991414 bytes) to `data/attachment-files/2016/12/x4813_15313809719_95c39c685d_h.jpg.pagespeed.ic.fkcAkt8crd.webp' (314742 bytes)
    [Mon, 05 Dec 2016 10:56:10 GMT] [Info] [20517] threads/test-thread-large-image-attachments.9698/:5426: Shrinking image `data/attachment-files/2016/12/4814_15314138547_2ce7609360_h.jpg' (875527 bytes) to `data/attachment-files/2016/12/x4814_15314138547_2ce7609360_h.jpg.pagespeed.ic.1bdajI4ROR.webp' (265702 bytes)
    [Mon, 05 Dec 2016 10:56:11 GMT] [Info] [20517] threads/test-thread-large-image-attachments.9698/:5430: Shrinking image `data/attachment-files/2016/12/4815_15334311839_8fda379ea3_h.jpg' (958833 bytes) to `data/attachment-files/2016/12/x4815_15334311839_8fda379ea3_h.jpg.pagespeed.ic.U8_vYiPbcz.webp' (373476 bytes)
    


    upload_2016-12-5_21-8-52.png
     
    Last edited: Dec 5, 2016
  12. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    9:40 AM
    Overall, I'd say this thread is performing a bit better than what I see on my site. Maybe because of the conversion to webp. However, if I were to do things this way, I know my members would keep asking why certain images weren't showing up right away. Also, I feel that there is some (admittedly small) risk involved in moving attachments using the [bd] addon. I don't want to take any chances with that.
     
  13. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah it can be risky for using addon especially one that isn't updated as frequent as XFRocks' ones. But you'd potentially reduce image related attachment size by 50-60% !

    I believe this thread went from total page size of ~19.1MB to just under ~2.9MB after ngx_pagespeed auto converted to webp
     
  14. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    webpagetest

    no ngx_pagespeed

    upload_2016-12-5_21-17-41.png

    ngx_pagespeed

    upload_2016-12-5_21-18-4.png

    upload_2016-12-5_21-18-25.png
     
  15. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    9:40 AM
    That can't be right, eva. 2.9MB for the page? Conversion to webp and other image optimizations don't reduce file size that much unless the images are resized or the image quality is smashed. Maybe some of the images didn't download in that test run?
     
  16. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    content breakdown image size dropped from 19,268,838 bytes for 39 images to 2,201,026 bytes for 41 images

    no ngx_pagespeed

    no-ngx_pagespeed-content-51216.png

    ngx_pagespeed

    ngx_pagespeed-content-51216.png

    pure power of ngx_pagespeed at work :D
     
    Last edited: Dec 5, 2016
  17. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    9:40 AM
    I see what is happening now. It's getting resized on your site. Control click on these and toggle between tabs to see the difference:

    Original (845kb, 1600px): https://c2.staticflickr.com/6/5818/30612090134_c411a922bc_o.jpg

    Optimized by your site (103kb, 929px): https://community.centminmod.com/da...3a4c43d4df_h.jpg.pagespeed.ic.gMibPjVj9n.webp

    Optimized by my site (512kb, 1600px): https://res.cloudinary.com/aminfms/...achments/15497565871_3a4c43d4df_h-jpg.494610/

    I'm experimenting with Cloudinary right now. Very pricy, jury still out about benefits...
     
  18. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ngx_pagespeed can auto resize the screen resolution user uses + auto convert to webp :D

    So mobile users get even smaller versions :)
     
  19. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    9:40 AM
    Yes, that is why I'd like to use it! But why is it resizing to those sizes in webpagetest when we're not using a mobile client? My members generally want to see the full 1600px when on desktop.
     
  20. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    IIRC, webpagetest defaults to 1280x pixel wide client browser resolutions. You can change it via custom script variables in docs Scripting - WebPagetest Documentation