Forum

Thread tagged as: Question, Configuration, Blog

I need "perch_blog_post_field" to output an image, as a background style, in its...

I'm using an image from a blog post as a linear-gradient background image in the template. The propblem is it outputs the smallest 50 by 50 px url. How do I get the full size image?

<div style="
        background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 1)), url( <?php perch_blog_post_field($post_slug, 'image')?> ); 
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center top; ">
Health check
 PHP 7.0.5 is up to date
 MySQL 5.6.29 is up to date
 Image processing available
Summary information
Perch: 3.1.1, PHP: 7.0.5, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: fd3bfdab644600c96b25beaf69d021447b7b4ec5 $, with PDO
Server OS: WINNT, apache2handler
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_backup (1.2)
App runtimes: <?php $apps_list = [ 'perch_blog' ];
PERCH_LOGINPATH: /perch
PERCH_PATH: C:\UniformServer\www\perch
PERCH_CORE: C:\UniformServer\www\perch\core
PERCH_RESFILEPATH: C:\UniformServer\www\perch\resources
Image manipulation: GD
PHP limits: Max upload 12M, Max POST 12M, Memory: 128M, Total max file upload: 12M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: localhost
DOCUMENT_ROOT: C:/UniformServer/www
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Torbjørn Heie

Torbjørn Heie 0 points

  • 3 years ago

Blog post fields are defined in the perch/templates/blog/post.html template. That's the normal location if you have customised the template. What does your post.html template look like?

Thank you. That fixed it:)