CDN 在某些頁面上提供圖像,但在其他頁面上不提供圖像
P粉710478990
P粉710478990 2023-09-15 18:29:13

我在嘗試解決網站上的問題時遇到了一些問題。

CDN(內容分發網路)可以在某些頁面上運行,但在其他頁面上無法運行,我首先認為這是由於路徑上的寫入錯誤造成的,但事實並非如此。

範例,不在此處工作(主頁:

<div class="container">

<div class="row wrap">
    
<article class="col-sm-3 entry animate__animated animate__fadeInUp" aria-label="" style="height: 417px;">
 
<a class="thumb_link aligncenter" href="https://example.com/the-link/" title="click to read">

<img style="" class="entry-image attachment-post lazyloaded thumb img-responsive" alt="text" src="https://example.com/wp-content/uploads/2023/05/img.png"><header class="entry-header"><h2 class="entry-title">Title</h2></header></a>

但它正在另一個頁面上運行(相同的帖子,相同的圖像)(以 Ezoic CDN 為例)(顯示所有最近發布的帖子的自定義頁面)

<div class="news-snippet"><a href="https://example.com/the-link/" rel="bookmark" class="featured-image">

<img src="https://sf.ezoiccdn.com/ezoimgfmt/example.com/wp-content/uploads/2023/05/img.png?ezimgfmt=rs:368x246/rscb1/ngcb1/notWebP" alt="text" ezimgfmt="rs rscb1 src ng ngcb1" class=" ezlazyloaded" data-ezsrc="https://sf.ezoiccdn.com/ezoimgfmt/example.com/wp-content/uploads/2023/05/image.png?ezimgfmt=rs:368x246/rscb1/ngcb1/notWebP" height="494" width="740" ezoid="0"></a>

<div class="summary">

<h4 class="news-title"><a href="https://example.com/the-link/" rel="bookmark">Title</a></h4><p>excerpt of post</p><a href="https://example.com/the-link/" rel="bookmark" class="readmore">Read More</a></div></div>

為什麼會發生這種情況?

我檢查了 WordPress 中顯示的路徑是否正確,一切看起來都很好。

路徑的位置不是問題,因為同一圖像在不同的頁面上得到最佳化。

P粉710478990
P粉710478990

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!