N
N
nsonso2017-01-16 09:53:57
JavaScript
nsonso, 2017-01-16 09:53:57

What is the best way to embed images on a website?

What you need to know about inserting images on the site?
For example, there is a regular landing page, the entire header of which is occupied by a large, high-quality (= weighing a lot) image. Because of this, the page may slow down.
How is this problem usually solved? What can be read about this?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Rafael™, 2017-01-16
@maxminimus

obviously there are two ways:
1) learn how to compress images
2) learn how to design minimalistically, keeping in mind kilobytes

N
Nikita Petrov, 2017-01-18
@petrovnr

If you are a straight-forward front-end and have a question in the js topic, then Gulp will help you, there are rules for compressing and processing an image. It's better to spend a couple of hours studying the project builder than forever walking around the left sites and optimizing each image and listening to how google pagespeed humiliates you anyway.

S
Sergey, 2017-01-16
@Shull

As an option: Responsive design has a method that uses several images of different sizes.
In JS, a script is created that loads a "heavy drawing" only if the monitor resolution is high.
If the resolution "does not hold up", then a smaller picture is used.
What to read: Read Add Air! Visual Design Essentials for Graphics, Web and Multimedia. Above you have correctly written: you need to design minimalistically.

M
Maxim Timofeev, 2017-01-16
@webinar

It all depends on the situation, there are many methods. Sometimes compressed copies of images are loaded along with the page, for example, blurry ones, then high-quality ajax ones are loaded. Sometimes it is justified to load the top of the site, the rest later. Sometimes they make a preloader that the user sees before the formation of a heavy page. In addition, there is gzip, you need to configure it on the server. In addition, some images can be combined into 1, to make the so-called sprite. And sometimes you just need to change the host. If you give a link to the site, you will be given more correct advice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question