Twentyseventeen large media stuck at 525px or 580px
-
A very frustrating recent issue with the twentyseventeen theme. Typically when I build a website I take a WordPress default theme and customize it with a child theme, rather than using a third party theme.
I’m building a site now that has large, full width images. I changed the settings for the twentyseventeen to one-column in the “customize” menu, and got rid of the floated two column via child-theme CSS.
I need to add a 1600px wide image to my home page via the WordPress visual editor. I uploaded the 1600px wide image, confirmed its size in the attachment window, but when I add it to the page and view it from the front end it shows up as only 580px wide, and looks horrible blown up.
The WordPress visual editor shows that the image inserted is 1600px wide. Also, when I click to choose the insert size, the “large” option is limited to 525px, NOT the custom 1200px size I chose in the media settings.
So twentyseventeen is overriding the media settings, as well as the actual inserted images, which annoys me. I did some research on it and found that the theme sets a Global content width of 525, but I can’t find a way to override that. I’ve tried removing the twentyseventeen “after_theme_setup” action, then defining my own – no dice. I’ve tried changing the Global content_width using the “template_redirect” action, no dice. The 580px (the size that my 1600px image is rendering as on the front end) is mentioned in the wp_calculate_image_sizes filter and the wp_get_attachment_image_attributes filter, but as a height parameter? So confused…
Looking at the theme’s functions.php, I see that
$GLOBALS['content_width'] = 525;
, and there are conditional global_width properties setup within the template_redirect action. I can’t get these to change for the life of me.I’ve tried adding the actions to my child theme with the settings I want, and I’ve tried removing the twentyseventeen actions then redefining mine, nothing seems to work or I’m not doing it right.
I don’t remember having this problem with any other theme, and $content_width I understand has been around for a while. Is this a theme bug? Or just the theme developer’s assumption that the average user wouldn’t need to go bigger because of the two-column layout?
Hoping that someone else has come across this issue and found a workaround. Once I pick a theme for development, I typically like to use it for everything (previously that theme was twentythirteen), and was hoping twentyseventeen would be the new standard, but I can see this issue coming up for a LOT of sites that we build.
Appreciate the time and help.
- The topic ‘Twentyseventeen large media stuck at 525px or 580px’ is closed to new replies.