Simple Image Optimization for SEO Optimization
By
daniel_puehringer, in Tutorials
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By fruid
I'm using custom fields for images (as mentioned here: processwire.com/blog/posts/pw-3.0.142) for a specific images-field, the images of which need to have an HTML-caption. It works fine so far. Now I'm trying to import pages that use this field. I first exported some pages of that kind to see what the spreadsheet would look like. It seems to not separate the captions for each images but instead put all images in one cell and all captions in another.
How could I go about importing these pages and assign the captions to the images accordingly?
-
By longtom
I'm creating this site where a 'motherpage' renders all subpages. I switched on frontend editing to make editing as easy as possible to end-users.
I'm stuck on adding images to the subpages. The frontend editor suggests to add images to the motherpage (that has no images field on it, nor should it), so it asks for another page to add the images to/from.
Is there a way to make the frontend-editor context aware so that it looks for images in the correct subpage?
I already tried the 'type C' approach and added <edit field="body" page="id">, but that doesn't seem to do the trick.
-
By Rossie
Hi Everyone,
I wish to display a gallery of images from multiple pages on the site. These images have custom fields created through page reference called 'furniture_list_type'. Each image now has a radio button which has been selected.
In the example code below all images appear from the "gallery20", however the selector "gallery20.furniture_list_type=3390" does not have any effect. "3390" is the id of the page reference "chair" selected through the page reference. I wish only images selected as chair to show.
Hope someone can help with this.
Thanks,
Calum
$imagePages = $pages->find("template=makers-child, gallery20.furniture_list_type=3390") ; foreach($imagePages as $p) { echo "<ul>"; foreach($p->gallery20 as $image) { echo "<li><img src='{$image->url}'>{$image->furniture_list_type}</li>"; } echo "</ul>"; } -
By picarica
so hello i am trying to combine my whole ass gallery with custom created watermark, i wanted to combine my images with simple text little opaque but that seemed harder and i couldnt make it work, well i cant make this work either, how are you handling watermarks? i would prefer if it would be plain PHP no imagemagick or some custom plugins scripts, but if neccesary i wont deny.
so here's my code
$pa = $pages->find("template=basic-page|art_gallery, images.tags!=''"); /* $pa = $pages->find("has_parent!=2,id!=2|7,status<".Page::statusTrash.",include=all"); */ echo "<div BRUUH class='row gtr-50 gtr-uniform js-filter' id='gal' >"; foreach ($pa as $p) { foreach($p->images as $image) { $obrazok = $image->url; $image = imagecreatefromjpeg($obrazok); $frame = imagecreatefromjpeg($pages->get('/settings/')->watermark->url); /* echo $image; echo $frame; */ # If you know your originals are of type PNG. imagecopymerge($image, $frame, 0, 0, 0, 0, 50, 50, 100); # Output straight to the browser. $img = imagepng($image); $options = array('quality' => 70, 'upscaling' => true, 'cropping' => 'center', 'sharpening'=>'medium'); $thumb = $img->size(400, 300, $options); $large = $img->size(1200, 0, $options); echo "<div class='$image->tags' class='col-4'>"; echo "<span style='overflow:hidden;'class='image fit'>"; echo "<a href='$large->url'>"; echo "<img class='uk-transform-origin-top-right' uk-scrollspy='cls: uk-animation-fade; repeat: false' src='$thumb->url' alt='$image->tags'>"; echo "</a>"; echo "</span>"; echo "</div>"; } };
-
By horst
Hi, on a site I want to disable access to original images and only allow to access thumbnails and watermarked image variations.
EDIT:
A good solution for protecting original images can be found a bit down in this thread:
Old content of this initial post:
-