Image field - seems to use thumbnail version (poor quality)

Permalink Browser Info Environment
Hi all

I've just created a block using the image field, but the image which is shown on the site very poor quality, unluck the original which I uploaded through the file manager. I've double-checked the original and it's fine.

The file which is displayed on the published page comes from the cache (/files/cache/251e2647e073510e6a6289a1efaed9f5.jpg) and not the main files area (which would be /files/6113/0555/5533/hero_home.jpg) so I'm assuming it's the thumbnail version that's being shown rather than the original file.

Any thoughts on this?

Type: Discussion
Status: New
melat0nin
View Replies: View Best Answer
jordanlev replied on at Permalink Best Answer Reply
jordanlev
IF you set a max width or height on the image field when you generate the block, then yes it will create a thumbnail for it. If you don't specify any width or height on the image field, then it will *not* create a thumbnail and just show the original instead.

If it's too late to go back and re-generate the block (i.e. you are already using it on a site and there is already content for it), you can modify the block you already have by editing its controller.php file, finding the view() function, and looking for something like this:
$this->set('field_3_image', $this->get_image_object($this->field_3_image_fID, 600, 400));

(it will be slightly different in your code -- just search for $this->get_image_object if you can't find it). Those numbers at the end are the max width and height -- change them both to 0 (zero) and that will disable thumbnailing.

-Jordan
melat0nin replied on at Permalink Reply
melat0nin
Jordan

That worked perfectly, thanks :)

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.