Jozsef
Members-
Posts
285 -
Joined
-
Last visited
Jozsef's Achievements
Sr. Member (5/6)
126
Reputation
-
Thanks, it is not the problem, it would be cropped from the centre then. Interestingly, if the focus point is not set the images are cropped from North, not centre. No matter what I tried, it doesn't work with percentages in the size options. I ended up setting the focus position for the image and it achieved the results. if (!$image->hasFocus) $image->focus(35,50); $resized = $image->size($w,$h)->webp->url;
-
The site is displaying a list of full body portraits that I'd like to crop with a focus on the face/shoulders. No focus has been set on the images and it's hundreds of them so I want a sensible default. This is the code below but it still crops from the top of the image, or the actual center (50%,50%). Is it a bug or I'm doing something wrong? $image = $gallery_page->images->first()->size(540,404,array("cropping" => array('50%','35%'), "quality" => 80))->webp->url; It's based on the latest API reference I've found: https://processwire.com/api/ref/pageimage/size/ It's very late but is it something I can't spot here? Should it work?
-
I've just had the same error and realised that if you just simply download the module and install it, it installs v1. So you have to go to Modules > New, uninstall v1 and install v2 as both versions are included in the module folder. Of course the new version only works with the pim2Load() method so you have to change that too.
-
I'm not sure but is that a mistake in the readme? The image, width, height and options all equal to $event->arguments(0) in the hook example.
-
Thanks a million, I know it will be a staple for me from now on.
-
How to display page while images are getting resized?
Jozsef replied to Jozsef's topic in General Support
@Robin S, thank you very much, that is such a nice gesture of you. I'll try this right away. ? -
How to display page while images are getting resized?
Jozsef replied to Jozsef's topic in General Support
Dimensions are available since they are based on image presets and Drupal includes width and height attributes I believe. We can do the same in ProcessWire but the page is not even sent until all the images in the template got resized that can take minutes for a gallery page. When including links to larger image variations, even images in the links get resized before the page can load even though they are not displayed immediately and could wait until someone clicks the link. -
How to display page while images are getting resized?
Jozsef replied to Jozsef's topic in General Support
Thanks @szabesz, I'm aware that it's possible but I don't want to pre-generate all image sizes for all images automatically. For example Drupal 7 resizes images on the fly too, based on image presets, yet the page displays and images load as they are generated. I am just hoping that it's possible to achieve something like this in template files. -
I love ProcessWire and I've been using it almost exclusively for the last 8 years. One thing that has never improved though is how the page loading is blocked while waiting for ALL images to be resized in the frontend. This is ok for a basic page with a single hero image and another 2-3 in the content but is seriously problematic for gallery pages or sites with loads of images. First page load can be incredibly long, or potentially time out. Would it not be much more user friendly if the page would display and images would appear when they are available in the requested size? I came from Drupal 7 where this was the normal behaviour, it was a shock with ProcessWire and unfortunately this is still the case. Is there a technical reason why it MUST be like this? While ideally this would be a feature in the core, what workaround do you all use to display the html/css/javascript while images are getting resized? Is there a module I've missed before?
-
Hi there, I can't wrap my head around this one, can someone help me with sorting this multi value field? Pages created by PageTable are hidden so they don't mix with "real" pages in the admin. I get the page content with $page->getUnformatted("field") and the use a foreach loop to display the content. It used to work just fine but on the last two websites the pages are all mixed up. Using the selector sort=sort displays them in the order they are listed in the admin, not in order they are listed in the PageTable field. I don't know how to access the "internal" sorting as per screenshot. Again, it used to work just fine, i don't know what has changed. Does anyone have any idea how to get the front end follow the order of the PageTable field content?
-
I'm having trouble displaying a pagetable field in the same order as it appears on the page edit screen. The child pages are hidden so I use $page->getUnformatted("field") to get the array of pages but a foreach loop outputs them in completely random order. When I try sort("sort") it then appears in the order of the child pages in the page tree so that "sort" refers to the order from the Pages table. I never had trouble with this in earlier versions, this random order appeared in the last two websites I'm developing. Is there a way to access the internal sort of the actual pagetable field as per screenshot?
-
Free tier email service for (very) occasional emails
Jozsef replied to joe_g's topic in General Support
I see, thanks. I'm looking for something to be used with ProMailer the client already uses to email users based on criteria. -
Free tier email service for (very) occasional emails
Jozsef replied to joe_g's topic in General Support
@bernhard, thanks for the suggestion, I was also looking for a low cost (possible free) alternative to SMTP for the client who very occasionally need to send larger campagins (around 8k). MailerSend's free tier does seem to be very good. Thanks for sharing your module too, however since it does not extend WireMail, RockMailerSend can only be used for custom solutions. There's no way to send all transactional emails from Processwire via MailerSend using your solution, correct? -
Thanks Bernhard, I'll try it in my next project. I did the exact same thing in most past projects, a headline text field in the format of *Bold Text* in the headline. As wbmnfktr I used the core markdown textformatter but in the template file I had to strip all tags apart from <em>. It was necessary because the core formatter adds paragraph tags around the headline that doesn't play well inside heading tags. Another negative about this approach is that I can't use front end editing. Your readme doesn't say anything about usage, does that mean I can just simply output the text field as $page->headline ? Or even $page->edit("headline")?
-
Thanks everyone, a lot of learning to do, I'll look into the suggestions. I've never used UIKit but Sortable looks the bill. Updating data would be the real challenge with my skills. @bernhard, such a module would be awesome. ?