Search the Community
Showing results for tags 'images'.
-
I was wondering if it's possible to sort user images via the API. I have added an 'images' custom field to the user template and am creating an outside login for artists (users with PW role 'artist') to edit their profile. This involves allowing them to upload images into their 'gallery' and sort them (via drag-n-drop) once uploaded. I was hoping there was some sort of 'sort' field that I could update via the API, but no luck there. I looked into how the admin allows this functionality and it's a bit over my head digging in the images field module. Any help would be greatly appreciated! - Ryan
-
Hi, I'm getting some odd filesize issues with PNGs when uploading to Processwire. I've optimised a PNG down to 260kb using Save for Web + ImageOptim. Original image for upload Once it has been resized by Processwire the filesize skyrockets to 7mb+ Resized image by Processwire I've tried playing with the 'quality' setting but all it seems to do is degrade the quality of the image but the file size stays exactly the same. Does anyone know what might be happening here to make a resized PNG such a huge filesize compared to the original? Thanks!
-
I have an issue where I want to have an image resized, but have both a cropped and non-cropped version available (of the same size!) The code to do this is simple: $imagefull = $image->size(320,320,array( 'cropping' => false); $imagecropped = $image->size(320,320,array( 'cropping' => true); However, this only creates ONE variant of the image: eg. imagename.320x320.jpg So the same image is shown twice in the output page, instead of the two options Can anyone suggest a clean way of doing this? (ie. not duplicating every base image) Is there a way of creating named Image Variations? And do these names go into the filename to guarantee uniqueness? eg. $image->addVariation($name,$size,$options) or similar Thanks
- 2 replies
-
- images
- image variations
-
(and 4 more)
Tagged with:
-
On this page we have allowed the customer to create their own Paypal cart button for a list of products http://www.inspirefit.co.uk/clothing/ Previously, we would use the image resize functions built in to Processwire (you know image->size(200,150) and all that) but to make an image work in Bootstrap 3 we need to allow it to do it's thing - ie remove this sizing statement. Bootstrap then applies its css: width: 100%; height: auto; But... as you see on this page, the client has uploaded massive images and the system has not cached anything. Giving us an undesirable pages of well sized but big image files. Is there a solution to this at all?
- 4 replies
-
- 1
-
-
- images
- responsive
-
(and 1 more)
Tagged with:
-
I'm having a weird issue with images in TinyMCE. When adding images to the images field (the default one), I add a description. Then I add the image to the body field via TinyMCE. Then save and the image has the correct alt text. So far so good... But, if I reopen the same image with the image button, the description is gone from the modal window. If I re-save, the image is displayed without the description. Looks like the image it's not retaining the original description value when editing. Is this a bug?
-
Using TinyMCE or CKEditor. Cant seem to find an option to float an image left or right. I can align but not float to wrap text or ad a margin? Am I missing something obvious?
-
Hello, Is there any way to resize images using processwire and PHP so that a maximum long edge value is respected? For example, I would like it so that landscape images are resized to a maximum width of (say) 900px and portrait images to a maximum height of 900px, and in both cases the second dimension adjusts to maintain the natural aspect ratio. Can this be done with processwire? Many thanks in advance, b
-
I have an area on a site currently where there's a series of portrait images that appear with a blend mode that was applied in Photoshop. As it stands, anyone adding a new portrait has to have Photoshop, download the source PSD, and export the new file. I don't think we'll need to add new portraits so often that this needs to be automated, but of course, that doesn't stop me from wanting to think about how to do it. What I'd like to do, ideally, is have the server apply the blend mode to the image either when it's uploaded or when it's rendered. I'm guessing I'd have to use GD to do this, and hook into image->size(), but I don't know exactly where I'd start.
-
If a page contains an image, I get no error. If a page does not contain an image I get the following. Fatal error: Exception: Invalid type to Pageimages::remove(item) message. Any suggestions is appreciated. my code: $first = $page->image->first; if (count($page->image) > 1) { echo "<h4>$page->title</h4>"; } foreach($page->image->remove($first) as $img) { if ($img) { echo "<img src='{$img->url}' />"; } }
-
Now that tags are possible for images I wonder whether this could be stored with images also: - ALT - COPYRIGHT Why? I have the description field which I use as caption and as "alt" attribute at the moment. But my editors have problems with that and fill up the description with to much information. I would like to store some information separately: 1. description would be output as caption. 2. the alt attribute would be open for manipulations to the SEO guys - without them ruining the caption. If no alt attribute is set, I would output the the description and if there is no description either, a ".". So we are always validating with out the need to code this manually for every single image used. 3. The copyright: This could be placed where we like it, maybe at the bottom of the page. This is very important to make the usage of many stock images legal. And we do not need to misuse the description for that any more.
-
Hello, I have an imagefield set to limit=1 and I try to replace this image via the API: $video->of(false); $video->teaserbild->removeAll(); $video->save(); $video->teaserbild = 'http://new_image.jpg'; $video->save(); The result in the admin is a broken image (missing file) as the first image (which was supposed to be removed) and the new one intact as second. I'm on PW 2.3.0. I've had this problem for a while and can't seem to solve it. Can someone help? Thanks, thomas
-
Hello I am trying to figure out how I can do this particular thing... when I upload a bunch of Image in a page I would like to make the first Images as a big thumbnail and rest in smaller thumbnails... I could not figure how I can manipulate each image separately.. hope I make sense.. Teja
-
Hello, I'm trying to change all upload image files names for the random names. So I put in Pageimage.php this lines: $rand = substr(md5(microtime()),rand(0,26),5); $basename = basename($rand, "." . $this->ext()); // i.e. myfile But as a results I got a lot of random filenames during each page loading. Please advise what do I miss? Thanks, AP
-
I am aware that this is (probably) not an issue related to PW, it's more likely a general issue in TinyMCE (and seems to be well-known among its developers already). I thought I'd mention it anyway: It is not possible to add images using TinyMCE's "Add image" button at a specific place in an editor's content in IE9. It always gets added at the beginning of the content in the editor, i.e. before the first text paragraph. I haven't tested it, but it probably doesn't work in IE8, either. Yes, I know there are different approaches of handling inserting images into the content which are preferable.
-
I am stuck. Seven days ago, something changed such that when users try to upload images to my PW site, the images are posted to the page, but they show up as zero bytes. The folder is created in the files folder, the image name is recorded, the type of file is recorded, but the byte size is zero. When I looked into the problem this morning, I received the "This request was aborted because it appears to be forged." message whenever I tried to upload images. Turning off protectCSRF in the config file suppresses the aborted image message and now I just get the zero-byte image bug, but I don't know why. I've checked permissions on the files directory, changed it recursively to 777 and then back to 755 with no change. I checked that I have active sessions, logs, and cache folders. I checked on the permissions of the config.php file. I changed the sessionName, and turned off the challenge and fingerprint functions but nothing is budging. I installed a new PW site yesterday and so I keep thinking something is colliding but it looks like the images have been failing to write to the files directory for the last week. I'm getting the same results in multiple browsers after any number of cache-clears so I don't think it is client-side. This is a look at the PHPinfo for the site. Best wishes, J
- 4 replies
-
- permissions
- images
-
(and 3 more)
Tagged with:
-
Hi all, I want to present a preview of my new Portfolio. Actually I'm unsure with some points and the images aren't the final ones and other pieces aren't finished too. But the look is ready and maybe it would be good to get some feedback from the critics here ;-) The site actually runs on PW 2.3 stable, the used modules are: ImagesManager ImageMinSize Thumbnails FieldtypeTextUnique Minify I have disabled direct access via .htaccess to portfolio-images that resides in the files folder. Thumbnails and images related to infos and news can be accessed directly, all others have to use a proxy page I have build as PW-template. With the ImagesManager I initially have created my six categories (albums) and manage all uploads. Via a hook into ImagesManager on upload I'm able to rename the original images and create 3 variations (600px, 900px, 1200px). Also I stripp all Exif and IPTC data from them but populate them with the minimal needed IPTC data. That way I never have custom related infos in the images, neither in filename nor in metadata. I use serverside mobiledetection and also JS to detect viewport dimensions. This should be used to serve images that fit best to devices and viewport dimensions. But it isn't ready now. The layout / design is done from HTML5 boilerplate. There are no frameworks or thatlike used / needed. But there is heavy use of Javascript (jQuery-Libs: Swipe, Stapel, Flexslider), but the site also runs completly in noscript mode. Also the single-image-view in NoScriptMode lets you loop through the gallery and displays the content scrolled down to the image if needed. (That's one of the advantages of old veterans that have build html-pages during browser war 1995/98 ) All critic, suggestions etc is welcome: http://pw4.nogajski.de/
-
I decided to rebuild an old image gallery site with PW. I know there's countless image-gallery scripts out there, but for my liking, most of them are too bloated. Also, I thought this was another good opportunity to dive further into PW-world. I'm keeping the old basic gallery structure: 95% of the galleries are in date-folders (monthly), like a blog archive. But I'd like to add some filter / search functionality, because there's just so many pics - when you come to the site and look for a specific subject, there was no way to do that on the old site. Q 1: How can I create a simple "search by image tag"? I want the results to list all images (thumbs) with tag x, and a link to the parent page. Q2: How would I most efficiently grab all tags from all pages, all images, and present it alphabetically (not necessary a fancy tag-cloud, but making sure I list each unique tag only once)? So when the user clicks on one tag link, he sees all image thumbs that have that tag on the results page. $p = $pages->find("images.tags~=$tag") works fine. I can explode("|", $p) to get a page-id array, but where would I go from here? A tag can be any anywhere, in various galleries (pages), and most pics have multiple tags. I'd like to group the results by page, so I guess I need to add 1-2 foreach loops, no? Can somebody help with some example code? I'm a bit stuck right now.
-
Hi, sometimes, when I try to upload an image, the thumbnail (and the image itself) appears with the wrong orientation (I have a vertical image but I get a horizontal one..) is there a quick fix? UPDATE: I notice this happens only with images I took with my smartphone. Using a "regular" camera (nikon D5000) works like a charm!
-
Hi everybody, I'm trying to use a repeater field to list different articles with a title, a description and an image gallery. This is what I want to achieve: <article class="ed2"> <h3>title</h3> <p> very long description </p> <ol class="thumb-grid group"> <li><a href="#"><img src="assets/temp-img.png" alt="thumbnail" /></a></li> <li><a href="#"><img src="assets/temp-img.png" alt="thumbnail" /></a></li> <li><a href="#"><img src="assets/temp-img.png" alt="thumbnail" /></a></li> <li><a href="#"><img src="assets/temp-img.png" alt="thumbnail" /></a></li> </ol> </article> I'm using this code (just testing if images are ready to use): <?php foreach($page->evento as $event){ echo "<article class='ed2'>"; echo "<h3>{$event->titolo_evento}</h3>"; echo "{$event->descrizione_evento}"; echo "<ol class='thumb-grid group'>"; echo "{$event->img_evento}"; echo "</ol>"; echo "</article>"; } ?> my output is this: <ol class='thumb-grid group'>020.jpg|175-0.jpg|ox.jpg</ol> So I Know all the images I uploaded are in place, but how do I loop inside the "img_evento" field to echo different urls?
-
Hi! Dumb question again here (% I have pages with different count of images. How can I output images with limit=3 for example?
-
Hello all, today I've got a problem with a form submission, specifically with images uploads. Before strarting this thread I've read and followed this topics: http://processwire.com/talk/topic/126-anybody-did-user-registrationlogin/ http://processwire.com/talk/topic/3105-adding-file-upload-field-to-form-via-api/ And here is my code: https://gist.github.com/anonymous/5517109 The form subscription worked correctly until I've integrated the WireUpload function, that seems to cause me some problems...infact if i comment out this count() check in the code... if(!count($files)) { $u->error("Sorry, but you need to add a photo!"); return false; } ... the form data get recieved (everything but the images..) and the newpage created. So it seems that the image upload never runs. I also tried to override PHP's upload_temp_dir with $config->uploadTmpDir = dirname(__FILE__) . '/assets/uploads/'; in site/config.php and use that folder as my temporary one, but no luck there too... I want to notice that my console didn't recieve any errors when I submit the form, everything seems to work but it's not I'm on a local server (Wamp on Windows) and in my php.ini file file uploads and temporary directory are set like this: ; Whether to allow HTTP file uploads. ; http://php.net/file-uploads file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ; http://php.net/upload-tmp-dir upload_tmp_dir = "c:/wamp/tmp" Any advices from you guys? Thanks.
-
I was wondering if anyone had experience with placing a threshold on the size of an upload using the images field. It doesn't matter if the constraint is by dimensional/pixel area or by kilobytes, the point is to only to keep gigantic camera jpegs off the system. Limiting the global php upload maximum isn't an option because the site needs to handle pdfs and other media. While the optimum strategy would resize the image programatically on upload (if it exceeds certain conditions), throwing an error would also be fine. Poking around InputfieldImage.module, I'm seeing maxWidth and maxHeight properties (applied in ___fileAdded the method) that look like they would be perfect, but I can't figure out to apply the settings to the field. Thanks!
-
Greetings Everyone, I'm working on a couple of sites that need some imaginative gallery ideas. I started browsing around to see some examples of creativity and discovered a new Lightbox concept from Todd Motto. Just thought I'd post about it here and see what people think. Here's the link: http://toddmotto.com/introducing-superbox-the-reimagined-lightbox-gallery/ Thanks, Matthew
-
This question is for Soma, but I'd appreciate everybody's input equally. Soma, in this thread you talked about how you shouldn't insert images in the wysiwyg, and I totally agree with your point about lack of designer control. You said, "Use repeater to make blocks with images and a option to align or size." I can kind of see what you're describing in my head, but I'm unsure how to go about it. I was wondering if you could elaborate. I am trying to set up a journal where the user would be able to write an article and possibly insert images into the text where appropriate. However, I've always hated how wysiwygs insert images, and I was looking for another way to go about it. The main problem I'm facing is that not all images are attached to the page's images field; the user may want to use an image from another page on the site. I hope that makes sense. Thanks in advance.