MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
naturalWidth and naturalHeight of images
Current time: 07-05-2020, 06:37 PM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
naturalWidth and naturalHeight of images
10-25-2017, 12:11 AM
Post: #1
naturalWidth and naturalHeight of images
My experience shows, that:
a. most performance impact make non-optimized / non-compressed images
b. original size of the most images is oversized in relation to their natiralWidth and naturalHeight (place on the page, allowed through HTML, CSS)

Without getting to know naturalWidth and naturalHeight of images, their compression remains not efficient: i.e.
- you have a non-compressed image.
- You know its physical size, 800x600, but you don't know its naturalWidth and naturalHeight (you can only guess, that they are smaller then physical size).
- In reality, naturalWidth and naturalHeight are 150x100.
- What do you do?
- You compress a 800x600 image without to cut it to 150x100 first.

But imagine, how huge would be the optimization win, if you firstly cut the image to its naturalWidth and naturalHeight, and then compress it?

It would be enough to test just a few pages - each page type, and, knowing naturalWidth and naturalHeight of images on all page types we would be able to cut all website images to their real sizes. And then compress.

Would it not be magic?
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
naturalWidth and naturalHeight of images - chilly_bang - 10-25-2017 12:11 AM

Forum Jump:

User(s) browsing this thread: 1 Guest(s)