Why CloudFlare APO ALWAYS ByPass My Website Images and Fonts?

Hello everyone. I have a small issue and i would like your help please.
I have a fairly simple wordpress website New tab (giftalisa.com)
Im using Cloudflare’s free plan along with APO to make my website faster and pass the pagespeed insights test.
for some reason the Cloudflare APO never caches my website header image (the monalisa banner)
and it always give me this ( cf-cache-status:BYPASS)
and it never ever show up this too (cf-edge-cache)
its the same thing with the fonts too which are hosted locally.
how can i point or force APO to cache this header image? i tried the cache everything page rule but it didn’t solve the problem but who knows maybe im missing something here…
any help is appreciated.
thank you and please accept my apology because i don’t know where to categorize this topic.

Hello everyone. I have a small issue and i would like your help please.
I have a fairly simple wordpress website New tab (giftalisa.com)
Im using Cloudflare’s free plan along with APO to make my website faster and pass the pagespeed insights test.
for some reason the Cloudflare APO never caches my website header image (the monalisa banner)
and it always give me this ( cf-cache-status:BYPASS)
and it never ever show up this too (cf-edge-cache)
its the same thing with the fonts too which are hosted locally.
how can i point or force APO to cache this header image? i tried the cache everything page rule but it didn’t solve the problem but who knows maybe im missing something here…
any help is appreciated.
thank you and please accept my apology because i don’t know where to categorize this topic.

Anyone? Help please :frowning:

Greetings,

Thank you for asking.

I’ve merged your older topic/posts to this one.

I am not aware of this. I have accessed your website and checked and I also do see BYPASS for images and fonts, and your homepage.

May I ask have you made some changes to any of your configuration settings for the APO?

Furthermore, is the Development Mode enabled or disabled at the Overview tab of Cloudflare dashboard for your domain name?

Are you using any specific Page Rules so far?

1 Like

First let me say thank your for replying and trying to help me, i do apologize for posting more than one topic of the same issue.

To answer your questions no i didn’t edit any settings for the APO.
the Development Mode is off.
and no I’m not using any specific page rules (i tried them to fix my issue but i deleted them shortly after)

to provide more information im using wp rocket with the cdn addon feature turned off (I’m using the official Cloudflare plugin)
i installed the official Cloudflare plugin and clicked on " Apply Recommended Cloudflare Settings for WordPress" button and turned on " Automatic Platform Optimization" too and purged everything.

I’ve tried many things to fix this issue, uninstalled wp rocket and purge everything, reinstall Cloudflare, different page rules. nothing worked for me. i was hoping someone could tell me what I’m doing wrong.
thank you mr.fritex

I recently ran into this issue and don’t think it’s actually related to APO, but to your origin instructing Cloudflare to bypass the cache.

The way I was able to fix it was adding a page rule that set the Edge Cache TTL. In my case, I chose a month.

2 Likes

I remember there were topics about WP Rocket + Cloudflare, therefore I suggest you to look up at the below articles in that terms:

I would also give it a try with a combination of Cloudflare APO for WordPress - but, maybe without WP Rocket or at least read below article if you are going to combine all that stuff as it could result having possible compatibillity issues as well if not configured correctly:

I just tried that now. still gives me the same results BYPASS.

Yes i followed these links before and its exactly how i set up wp rocket to work with Cloudflare apo. it worked for them but not me :frowning:
its very confusing im trying to solve this issue for many days now but to no avail…

Also i noticed something odd…
i just deleted Cloudflare plugin and purged everything from everywhere but cloudflareAPO page still says “WordPress plugin successfully detected on www.giftalisa.com, giftalisa.com.”
something is not right…

Help please :frowning:

No one can explain why this is happening?

Have you checked and tried below suggestion?:

Otherwise, either wait when someone else replies.

May I ask have you tried searching these forums for any of the additional information by using a :search: icon at the top right corner?

Nevertheless, feel free and kindly I’d suggest you to write a ticket to Cloudflare support due to your account and/or domain issue and share the ticket number here with us so we could escalate this issue:

  • Login to Cloudflare and then contact Cloudflare Support by clicking on the Get More Help button. If you get automatic reply, reply and indicate to it you need more help and reference to this topic
  • Or send an an e-mail to support[at]cloudflare[dot]com from your e-mail associated with your Cloudflare account

UPDATE:

When I try to open https://www.giftalisa.com/wp-content/uploads/2022/02/giftalisa-homepage-banner.jpg it says it’s image/webp MIME-type → are you using Cloudflare Polish feature?

Hi. yes i tried the suggestion of johnson.philip.louis but it didnt work for me. i do agree with him though…
its the ORIGIN CACHE-CONTROL headers. who control these? how to edit them? wordpress or godaddy my original server? is there anyway to edit them manually?

and yes i swear i searched here for so long (on google too) before posting this topic…
and no im not using the polish feature its just a normal jpg i didnt even convert it to webp like the other images in my website. Cloudflare doesnt cache ANY images regardless of it being jpeg or webp…

and i will do as you said about the support ticket. thank you my friend.

ive sent emails to both Cloudflare and godaddy. hopefully this will be solved soon.

1 Like

If you receive a reply (even automatic), please check for any ticket number in the content/title of it and share it with us here so we could escalate this. Thank you in advance.

im not sure 100% about this but they gave me this:
Cloudflare doesn’t cache ANY images or fonts on my website – Cloudflare Help Center
and THANK YOU. im the one needing the help :slight_smile: thank you kindly

1 Like

Thank you for sharing, I’ve escalated it.

1 Like

Not sure if this have anything to do with the issue im having. its from the .htaccess file

# BEGIN WP Rocket v3.10.7
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset UTF-8
# Force UTF-8 for a number of file formats
<IfModule mod_mime.c>
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
</IfModule>

# FileETag None is not enough for every server.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>

# Since we’re sending far-future expires, we don’t need ETags for static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None

<IfModule mod_alias.c>
<FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$">
<IfModule mod_headers.c>
Header set X-Powered-By "WP Rocket/3.10.7"
Header unset Pragma
Header append Cache-Control "public"
Header unset Last-Modified
</IfModule>
</FilesMatch>

<FilesMatch "\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
<IfModule mod_headers.c>
Header unset Pragma
Header append Cache-Control "public"
</IfModule>
</FilesMatch>
</IfModule>

<IfModule mod_mime.c>
	AddType image/avif                                  avif
    AddType image/avif-sequence                         avifs
</IfModule>
# Expires headers (for better cache control)
<IfModule mod_expires.c>
	ExpiresActive on
	ExpiresDefault                              "access plus 1 month"
	# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
	ExpiresByType text/cache-manifest           "access plus 0 seconds"
	# Your document html
	ExpiresByType text/html                     "access plus 0 seconds"
	# Data
	ExpiresByType text/xml                      "access plus 0 seconds"
	ExpiresByType application/xml               "access plus 0 seconds"
	ExpiresByType application/json              "access plus 0 seconds"
	# Feed
	ExpiresByType application/rss+xml           "access plus 1 hour"
	ExpiresByType application/atom+xml          "access plus 1 hour"
	# Favicon (cannot be renamed)
	ExpiresByType image/x-icon                  "access plus 1 week"
	# Media: images, video, audio
	ExpiresByType image/gif                     "access plus 4 months"
	ExpiresByType image/png                     "access plus 4 months"
	ExpiresByType image/jpeg                    "access plus 4 months"
	ExpiresByType image/webp                    "access plus 4 months"
	ExpiresByType video/ogg                     "access plus 4 months"
	ExpiresByType audio/ogg                     "access plus 4 months"
	ExpiresByType video/mp4                     "access plus 4 months"
	ExpiresByType video/webm                    "access plus 4 months"
	ExpiresByType image/avif                    "access plus 4 months"
	ExpiresByType image/avif-sequence           "access plus 4 months"
	# HTC files  (css3pie)
	ExpiresByType text/x-component              "access plus 1 month"
	# Webfonts
	ExpiresByType font/ttf                      "access plus 4 months"
	ExpiresByType font/otf                      "access plus 4 months"
	ExpiresByType font/woff                     "access plus 4 months"
	ExpiresByType font/woff2                    "access plus 4 months"
	ExpiresByType image/svg+xml                 "access plus 4 months"
	ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
	# CSS and JavaScript
	ExpiresByType text/css                      "access plus 1 year"
	ExpiresByType application/javascript        "access plus 1 year"
</IfModule>
# Gzip compression
<IfModule mod_deflate.c>
# Active compression
SetOutputFilter DEFLATE
# Force deflate for mangled headers
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
# Don’t compress images and other uncompressible content
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
</IfModule>
</IfModule>

# Compress all output labeled with one of the following MIME-types
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
		                          application/javascript \
		                          application/json \
		                          application/rss+xml \
		                          application/vnd.ms-fontobject \
		                          application/x-font-ttf \
		                          application/xhtml+xml \
		                          application/xml \
		                          font/opentype \
		                          image/svg+xml \
		                          image/x-icon \
		                          text/css \
		                          text/html \
		                          text/plain \
		                          text/x-component \
		                          text/xml
</IfModule>
<IfModule mod_headers.c>
Header append Vary: Accept-Encoding
</IfModule>
</IfModule>

<IfModule mod_mime.c>
AddType text/html .html_gzip
AddEncoding gzip .html_gzip
</IfModule>
<IfModule mod_setenvif.c>
SetEnvIfNoCase Request_URI \.html_gzip$ no-gzip
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} on [OR]
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} https
RewriteRule .* - [E=WPR_SSL:-https]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* - [E=WPR_ENC:_gzip]
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP:Cookie} !(wordpress_logged_in_.+|wp-postpass_|wptouch_switch_toggle|comment_author_|comment_author_email_) [NC]
RewriteCond %{REQUEST_URI} !^(/(.+/)?feed/?.+/?|/(?:.+/)?embed/|/(index\.php/)?wp\-json(/.*|$))$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^(facebookexternalhit|WhatsApp).* [NC]
RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/wp-rocket/%{HTTP_HOST}%{REQUEST_URI}/index%{ENV:WPR_SSL}%{ENV:WPR_WEBP}.html%{ENV:WPR_ENC}" -f
RewriteRule .* "/wp-content/cache/wp-rocket/%{HTTP_HOST}%{REQUEST_URI}/index%{ENV:WPR_SSL}%{ENV:WPR_WEBP}.html%{ENV:WPR_ENC}" [L]
</IfModule>
# END WP Rocket

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
# BEGIN HttpHeaders
# The directives (lines) between "BEGIN HttpHeaders" and "END HttpHeaders" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeaders
# BEGIN HttpHeadersAuth
# The directives (lines) between "BEGIN HttpHeadersAuth" and "END HttpHeadersAuth" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersAuth
# BEGIN HttpHeadersCompression
# The directives (lines) between "BEGIN HttpHeadersCompression" and "END HttpHeadersCompression" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersCompression
# BEGIN HttpHeadersContentType
# The directives (lines) between "BEGIN HttpHeadersContentType" and "END HttpHeadersContentType" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersContentType
# BEGIN HttpHeadersExpires
# The directives (lines) between "BEGIN HttpHeadersExpires" and "END HttpHeadersExpires" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersExpires
# BEGIN HttpHeadersCookieSecurity
# The directives (lines) between "BEGIN HttpHeadersCookieSecurity" and "END HttpHeadersCookieSecurity" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersCookieSecurity
# BEGIN HttpHeadersTiming
# The directives (lines) between "BEGIN HttpHeadersTiming" and "END HttpHeadersTiming" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END HttpHeadersTiming
# BEGIN WP Cloudflare Super Page Cache
# The directives (lines) between "BEGIN WP Cloudflare Super Page Cache" and "END WP Cloudflare Super Page Cache" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END WP Cloudflare Super Page Cache
1 Like

Looking at the ticket now.

2 Likes