Forum

Thread tagged as: Configuration

Default assets compression

Hi,

all assets uploaded via perch interface get heavily compressed.

For ex. this image https://www.trilipiderm.com/perch/resources/mothersday16-1-6.jpg

When i download this image via ftp i can see, it has the correct size and original quality.

The compression is still the same even when I setup the field type like this.

<img data-u="image" src="<perch:content type="image" density="1" quality="100" sharpen="0" id="hp_carousel_image" label="Banner" />" alt="<perch:content id="hp_carousel_alt" type="text" label="Alt text" required="false" />" />

Thank you.

Wesley Gooch

Wesley Gooch 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

We need to see your Diagnostics Report and template when you post to the forum - thank you!

Hi,

PERCH INFORMATION

Perch: 2.8.8
Production mode: Staging (50)
Installed apps: content (2.8.8), assets (2.8.8), categories (2.8.8), perch_forms (1.7), perch_backup (1.2)
DB driver: PDO
DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 6
App runtimes:
<?php
    include(PERCH_PATH.'/core/apps/content/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_forms/runtime.php');
?>
Editor plug-ins: markitup, redactor
H1: 062f5697348d1cb8c1ec20bd87ee065b
L1: eccac16f737eea78bbd9fb5934233aae
headerColour: #515151
content_singlePageEdit: 1
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.1: done
latest_version: 2.8.15
headerScheme: dark
perch_upgrade_v1_prefix: perch_
dashboard: 0
content_hideNonEditableRegions: 1
headerLinkColour: #000000
linkColour: #333333
editorMayDeleteRegions: 0
helpURL:
perch_backup_mysqldump_path: /usr/bin/mysqldump
update_2.2.1: done
update_2.2.6: done
update_2.4.5: done
on_sale_version: 2.8.29
update_2.5.4: done
update_2.8.8: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_TZ: America/Denver
PERCH_DB_PREFIX: perch2_
PERCH_PRODUCTION_MODE: 50
PERCH_DB_SERVER: internal-db.s147995.gridserver.com
PERCH_DB_DATABASE: db147995_perch_staging
PERCH_DB_USERNAME: db147995_staging
PERCH_LOGINPATH: /perch
PERCH_PATH: /nfs/c10/h02/mnt/147995/domains/trilipiderm.com/html/perch
PERCH_CORE: /nfs/c10/h02/mnt/147995/domains/trilipiderm.com/html/perch/core
PERCH_RESFILEPATH: /nfs/c10/h02/mnt/147995/domains/trilipiderm.com/html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5:
PERCH_XHTML_MARKUP: 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_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /nfs/c10/h02/mnt/147995/domains/trilipiderm.com/html/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.3.29
Zend: 2.3.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.47
MySQL server: 5.1.63-rel13.4
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, intl, json, ldap, mbstring, mcrypt, mysql, mysqli, standard, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, apc, posix, pspell, Reflection, imap, SimpleXML, soap, sockets, SQLite, exif, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, Phar, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 99M
PHP max form post size: 99M
PHP memory limit: 99M
Total max uploadable file size: 99M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /usr/local/bin:/usr/bin:/bin
REDIRECT_HANDLER: php-script
REDIRECT_STATUS: 200
UNIQUE_ID: VysA3kDPiBcAABTW@lwAAAAp
SCRIPT_URL: /perch/core/settings/diagnostics/
SCRIPT_URI: https://www.trilipiderm.com/perch/core/settings/diagnostics/
WM_UCONTROL_XMLRPC_SERVER: https://10.0.0.13
ACCESS_DOMAIN: s147995.gridserver.com
DATABASE_SERVER: internal-db.s147995.gridserver.com
SITE_ROOT: /home/147995
SITE_CGIROOT: /home/147995/cgi-bin
SITE_HTMLROOT: /home/147995/domains/trilipiderm.com/html
HTTP_PHPCONF: 1636499492
HTTP_HOST: www.trilipiderm.com
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36
HTTP_DNT: 1
HTTP_REFERER: https://www.trilipiderm.com/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8,cs;q=0.6,sk;q=0.4
HTTP_COOKIE: __smListBuilderShown=true; ajs_anonymous_id=%22c12ef523-f571-45e7-8093-539abb61d627%22; cmsa=1; PHPSESSID=dfa4a836a54929d91de7e4f74d256310; ajs_user_id=null; ajs_group_id=null; __unam=d1122e5-153a9b7679b-317839f1-236; _ga=GA1.2.2051854165.1459533628; __ar_v4=7GPIRYW6XFCKPD6KDORNKJ%3A20160411%3A81%7CI3VWUJT7LBDJ5LA3UKEPHU%3A20160411%3A81%7CEIV3X53FR5HJPLXO5G2RRQ%3A20160411%3A81; __smToken=Ilo11bZ3meE3GDrtOCT4aApP; cmssb=1
SERVER_SIGNATURE: <address>Apache/2.2.22 Server at www.trilipiderm.com Port 80</address>
SERVER_SOFTWARE: Apache/2.2.22
SERVER_NAME: www.trilipiderm.com
SERVER_ADDR: 64.207.139.98
SERVER_PORT: 80
REMOTE_ADDR: 196.112.137.21
DOCUMENT_ROOT: /home/147995/domains/trilipiderm.com/html
SERVER_ADMIN: webmaster@trilipiderm.com
SCRIPT_FILENAME: /home/147995/domains/trilipiderm.com/html/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 58617
REDIRECT_QUERY_STRING: extended
REDIRECT_URL: /perch/core/settings/diagnostics/index.php
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /etc/apache2/gs-bin/php-legacy
ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php
ORIG_PATH_TRANSLATED: /home/147995/domains/trilipiderm.com/html/perch/core/settings/diagnostics/index.php
ORIG_SCRIPT_NAME: /gs-bin/php-legacy
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME: 1462436062
argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you uploaded a new image file since changing the quality attribute?

I'd suggest using a low level of sharpening to offset the natural softening that will occur when an image is scaled down.

Yes, I did, but with no luck, alwas the same.

<img data-u="image" src="<perch:content type="image" density="1" quality="100" sharpen="0" id="hp_carousel_image" label="Banner" />" alt="<perch:content id="hp_carousel_alt" type="text" label="Alt text" required="false" />" />

Also, when i overwrite uploaded images on ftp with uncompressed versions and look at the files in a browser - it looks compressed.

https://www.trilipiderm.com/perch/resources/mothersday16-1-6.jpg

Drew McLellan

Drew McLellan 2638 points
Perch Support

I just noticed you're not specifying a width or height - in which case Perch is not doing anything to your image. The quality and sharpness only affects image resizing.

If you're seeing a difference between the file you're downloading via HTTP and FTP, then you should look at what's happening on your network. For example, mobile data networks will often heavily compress images.

Thanks Drew, ill look into it.