onAttachment not found

DevPunk

Member
File XF/Service/Attachment/Preparer.php

Code:
// Core thumbnails will always be the size.
// Content specific thumbs can be generated by handlers using onAttachment.
$thumbSize = $this->app->options()->attachmentThumbnailDimensions;

I cannot find this in the AbstractHandler
In general, there is not even "onAttachment" in the entire XF code.


I would like to change the ThumbSize for my content.
 
There's \XF\Attachment\AbstractHandler:onNewAttachment. You'd generally call some service which generates custom thumbnails there.
 
OK. I have looked at everything! I don't see any way to prevent the creation of the thumbs that XF creates. This would mean that unnecessary computing time is wasted when I then want to create thumbs again in "onNewAttachment" according to my ideas.
 
Yes, the core thumbnails are expected to exist for all attachments and have the same dimensions. You may create additional thumbnails if your needs differ (which is what XFMG does, for example).
 
Top Bottom