Search the Community
Showing results for tags 'FieldtypeImage'.
-
I have a page on a shared hosting service, with a I/O max usage of 3072.0 KB/s . This is usually more than ok, but when I upload large images and resize them (to thumbnail and front end), the I/O usage skyrockets and often hits the limit. I am no server pro, and have asked my hosting company if this is a problem, and gotten an vague answer. So I am jumping ahead a few steps and asking here how people handle large images in ProcessWire? We are talking about images up to 10–15 MB, sizes up to 5184x3456 or more. I like to keep the original in case of future resizing. Maybe I'm overkilling it anyway, and maybe it's uneccessary. But still I wonder how other ProcessWire-users handles I/O usage and images.
-
I am trying to extend InputfieldImage & FieldtypeImage. I want something like this: $page->image->action('param'); When I call method action() i want read settings saved with my ExtendedInputImageField field. Then i want perform action based on that settings. I have first part. I can save EntendedInputImageField settings when I configure new field. In this way I save the settings: public function ___getConfigInputfields() { $inputfields = parent::___getConfigInputfields(); //[...] $field = $this->modules->get("InputfieldTextarea"); $field->attr('name', 'advSetting'); $field->attr('value', $this->advSetting? (string) $this->advSetting : ''); $field->label = $this->_("Advenced Settings"); $field->description =''; $fieldset->add($field); //[...] $inputfields->add($fieldset); return $inputfields; } <?php Pageimage::action Hook class FieldtypeExtendedImage extends FieldtypeImage { // [...] public function init() { $this->addHook('Pageimage::action', $this, 'action'); } public function action(HookEvent $event) { // How can I read 'advSetting' settings here? } //[...] }
- 2 replies
-
- 1
-
- FieldtypeImage
- InputfieldImage
-
(and 2 more)
Tagged with: