• FREEZhao

    (@freezhao)


    I am trying to set CDN for my website, but after that I found the the cdn img file in the home cover page is limited to 580px width. so the img looks fuzzy and aliased.

    after I check all the setting both in plugin and theme

    I find the code in Chaplin functions.php

    		// Set content-width
    		global $content_width;
    		if ( ! isset( $content_width ) ) {
    			$content_width = 580;
    		}

    Can I delete it or is it possible to update the code to sole CDN problem?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @freezhao,

    The theme content width is used by WordPress to determine the width of embeds and other elements, so I wouldn’t recommend removing it (and I believe WordPress sets it to a default value in Core, so removing the theme code for it might not solve the problem).

    I’d get in touch with your CDN to find out if there’s a workaround on their end. Limiting all images to the $content_width seems odd on their part, since wide and full alignments in the Block Editor mean that images are frequently used wider than the $content_width these days, even in the post content.

    — Anders

Viewing 1 replies (of 1 total)
  • The topic ‘The img bug in CDN situation’ is closed to new replies.