Forum

Thread tagged as: Problem, Error, Blog

Blog Images not resizing

I'd like to have an image thumbnail in the blog previews, and the default post_in_list.html template has a good example already:

<img src="<perch:blog id="image" type="image" width="50" height="50" crop="true" />" alt="<perch:blog id="postTitle" />" />

The only problem is I'd like the thumbnail size to be a bit bigger, so if I change it to this...

<img src="<perch:blog id="image" type="image" width="150" height="150" crop="true" />" alt="<perch:blog id="postTitle" />" />

All of a sudden there's no image resizing at all and it's displaying the original uploaded image resolution. It seems only setting a height & width of 50 resizes and crops the image, everything else the size is ignored and the full res image is outputted. Is this a bug or am I doing something wrong?

Chad Tiffin

Chad Tiffin 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Have you resaved the post after changing the image size in the template? We don't size images on the fly, it happens at edit time.

If that isn't the issue then we need to see your full template and Diagnostics Report.

Yes, I've tried adding different photos and saving too, but it still seems to not do any resizing at all.

PERCH INFORMATION

Perch: 2.8.29
Production mode: Production (100)
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_blog (5.0)
DB driver: MySQLi
DB tables: perch2_blog_authors (1), perch2_blog_comments (0), perch2_blog_index (23), perch2_blog_posts (1), perch2_blog_posts_to_tags (0), perch2_blog_sections (1), perch2_blog_tags (0), perch2_blogs (1), perch2_categories (0), perch2_category_counts (0), perch2_category_sets (1), perch2_content_index (2787), perch2_content_items (667), perch2_content_regions (47), perch2_navigation (1), perch2_navigation_pages (8), perch2_page_templates (3), perch2_pages (42), perch2_resource_log (1135), perch2_resource_tags (17), perch2_resources (272), perch2_resources_to_tags (100), perch2_settings (25), perch2_user_passwords (2), perch2_user_privileges (35), perch2_user_role_privileges (32), perch2_user_roles (2), perch2_users (3)
Users: 3
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog'
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup, tinymce
H1: 37858a0d959bc249621b9065c3074c30
L1: 0373e2683e531703fcc049ade53bb00f
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #4e5b26
content_singlePageEdit: 1
helpURL:
siteURL:
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.6: done
latest_version: 2.8.15
on_sale_version: 2.8.32
headerScheme: dark
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
logoPath: /perch/resources/logo.png
update_2.8.29: done
perch_blog_update: 5.0.1
perch_blog_post_url: /en/post.php?s={postSlug}
perch_blog_site_name:
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: sherwood
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: sherwood
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: c****m
PERCH_EMAIL_FROM_NAME: C** *n
PERCH_LOGINPATH: /perch
PERCH_PATH: C:\Websites\sherwoodinn.ca\www\perch
PERCH_CORE: C:\Websites\sherwoodinn.ca\www\perch\core
PERCH_RESFILEPATH: C:\Websites\sherwoodinn.ca\www\perch\resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: C:\Websites\sherwoodinn.ca\www\perch\templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET:
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.5.32
Zend: 2.5.0
OS: WINNT
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $
MySQL server: 5.6.24-log
Free disk space: 138.08 GB
Extensions: Core, bcmath, calendar, ctype, date, ereg, filter, ftp, hash, iconv, json, mcrypt, SPL, odbc, pcre, Reflection, session, standard, mysqlnd, tokenizer, zip, zlib, libxml, dom, PDO, openssl, SimpleXML, wddx, xml, xmlreader, xmlwriter, cgi-fcgi, curl, gd, mbstring, mysql, mysqli, soap, gettext, Phar, xmlrpc, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 64M
PHP max form post size: 8M
PHP memory limit: 256M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
_FCGI_X_PIPE_: \\.\pipe\IISFCGI-1a29d0e1-b4ac-49b0-bb76-742e42446521
PHPRC: C:\php-5.5.32-nts-Win32-VC11-x86\
PHP_FCGI_MAX_REQUESTS: 10000
ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_ID: sherwoodinn.ca
CommonProgramFiles: C:\Program Files\Common Files
COMPUTERNAME: 88535-10
ComSpec: C:\Windows\system32\cmd.exe
DFSTRACINGON: FALSE
FP_NO_HOST_CHECK: NO
LOCALAPPDATA: C:\Windows\system32\config\systemprofile\AppData\Local
OS: Windows_NT
Path: C:\Program Files\ImageMagick-6.9.1-Q16;C:\Program Files\PHP\v5.3;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE: x86
PROCESSOR_IDENTIFIER: x86 Family 6 Model 26 Stepping 4, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 1a04
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files
PSModulePath: C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC: C:\Users\Public
SystemDrive: C:
SystemRoot: C:\Windows
TEMP: C:\Windows\TEMP
TMP: C:\Windows\TEMP
TRACE_FORMAT_SEARCH_PATH: \\winseqfe\release\Windows6.0\lh_sp2rtm\6002.18005.090410-1830\x86fre\symbols.pri\TraceFormat
USERDOMAIN: 88535
USERNAME: 88535-10$
USERPROFILE: C:\Windows\system32\config\systemprofile
windir: C:\Windows
ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php
URL: /perch/core/settings/diagnostics/index.php
SERVER_SOFTWARE: Microsoft-IIS/7.0
SERVER_PROTOCOL: HTTP/1.1
SERVER_PORT: 80
SERVER_NAME: sherwoodinn.ca
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_METHOD: GET
REMOTE_PORT: 12651
REMOTE_HOST: 107.179.148.7
REMOTE_ADDR: 107.179.148.7
QUERY_STRING: extended
PATH_TRANSLATED: C:\Websites\sherwoodinn.ca\www\perch\core\settings\diagnostics\index.php
LOCAL_ADDR: 209.41.161.178
INSTANCE_META_PATH: /LM/W3SVC/6
INSTANCE_ID: 6
HTTPS: off
GATEWAY_INTERFACE: CGI/1.1
APPL_PHYSICAL_PATH: C:\Websites\sherwoodinn.ca\www\
APPL_MD_PATH: /LM/W3SVC/6/ROOT
IIS_UrlRewriteModule: 7.1.0871.0
SCRIPT_FILENAME: C:\Websites\sherwoodinn.ca\www\perch\core\settings\diagnostics\index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
INSTANCE_NAME: SHERWOODINN.CA
DOCUMENT_ROOT: C:\Websites\sherwoodinn.ca\www
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.101 Safari/537.36
HTTP_REFERER: https://sherwoodinn.ca/perch/core/settings/diagnostics/
HTTP_HOST: sherwoodinn.ca
HTTP_COOKIE: cmsa=1; __utmt=1; __utma=154977658.1456881059.1476306096.1477836205.1477855574.17; __utmb=154977658.7.10.1477855574; __utmc=154977658; __utmz=154977658.1476306096.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); PHPSESSID=7k0ar3a7jmbgv0ia6dik23hug1
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_CONNECTION: keep-alive
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1477855965.052
REQUEST_TIME: 1477855965
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you made that change in both the post.html template and the one you're using to display the post?

Thank you... that was the issue