简体   繁体   English

网站上的图片需要一段时间才能加载

[英]pictures on website taking a while to load

I've literally just wrote the same post a couple of minutes ago.几分钟前我刚刚写了同一篇文章。 The whole thing was so lazy and poorly written I'm re posting the question.整件事太懒惰,写得不好,我重新发布了这个问题。 Apologies for the first post.为第一篇文章道歉。

Here is my website:这是我的网站:

top-drawer.net/artists.html top-drawer.net/artists.html

When I use a browser that isn't my own it's very noticeable how long the pictures take to load in. I'm talking about the artists page and the individual artist own pages.当我使用不是我自己的浏览器时,加载图片需要多长时间是非常明显的。我说的是艺术家页面和个人艺术家自己的页面。 When you click on the pages you watch the images slowly load in and when you are showing someone new the website it really doesn't look professional at all.当您点击页面时,您会看到图像缓慢加载,而当您向新网站展示时,它看起来真的一点也不专业。

What is causing this and how do I go about fixing it??这是什么原因造成的,我该如何解决?

just for information I'm using google chrome to view my work.仅供参考,我正在使用谷歌浏览器查看我的作品。

It takes a little long because there is a script which change the opacity of the img element from zero to 100%, that is why you cannot see them immediately.这需要一点时间,因为有一个脚本可以将 img 元素的不透明度从 0 更改为 100%,这就是您无法立即看到它们的原因。 Try to change it from:尝试将其更改为:

$('#slider').backstretch([
  "/../images/bennyPalmer/2.jpg"
  , "/../images/bennyPalmer/8.jpg"
  , "/../images/bennyPalmer/3.jpg"
], {duration: 3000, fade: 750});

to:到:

$('#slider').backstretch([
  "/../images/bennyPalmer/2.jpg"
  , "/../images/bennyPalmer/8.jpg"
  , "/../images/bennyPalmer/3.jpg"
], {duration: 3000, fade: 750, fadeFirstImage: false});

Note that you need the last version of the repository.请注意,您需要存储库的最新版本。 Here the reference: https://github.com/srobbin/jquery-backstretch/pull/345这里参考: https : //github.com/srobbin/jquery-backstretch/pull/345

Your images take so long to load (in the Artists page) because they are big files.您的图像需要很长时间才能加载(在艺术家页面中),因为它们是大文件。 Try creating thumbnails of the large images尝试创建大图像的缩略图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM