Jump to content

Search the Community

Showing results for tags 'image'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. I'm attempting to make a photoblog type of site and was wondering if there's a clean way to get the image directory path when using the $image->size method. The purpose of this is so the user can upload their large images, display as a thumbnail and click to view a medium version no taller than 800px within a modal. As you can see, I've had to hardcode the site/assets/files directory. Is there another method? (*the getThumb function refers to another installed module) foreach($page->images as $image) { echo '<a href="site/assets/files/'.$page->id.'/'.$image->size('','800').'"><img src="'.$image->getThumb('thumbnail').'" alt="'.$image->description.'"/>'; }
  2. Hi, I've installed ACE Text Editor today and it's awesome to directly write markdown in a really good looking way. But what I found to be tricky is to insert images there. It would be nice to get some kind of image import like in TinyMCE there, but I think this could be a little time consuming. So I got myself a little workaround. I've added a little input below the description to the ImageField module to show me the url, so I can easily copy it into my body. This would be a nice optional feature to have, so people could activate it if needed. protected function ___renderItem($pagefile, $id, $n) { $thumb = $pagefile; if($this->adminThumbs && $thumb->height > $this->adminThumbHeight) { // create a variation for display with this inputfield $thumb = $thumb->height($this->adminThumbHeight); } $out = [...] // own Code "\n\t\t\t<input disabled style='width: 99%' type='text' name='url_$id' value='{$pagefile->url}' />" . // End own Code "\n\t\t</p>"; return $out; }
  3. Hi, I want to process images being uploaded to PW by a client. Basically, making a sepia version of the images (with manual settings). I'm wondering: where's the best place/moment to implement this kind of process? Do you have any suggestions? FYI: I'm also using the cropping image tool by Antti Peisa. Here's my code. It loads the image, filters it and then overwrites it. $image = imagecreatefromjpeg('myimage.jpg'); // the original file imagefilter($image, IMG_FILTER_GRAYSCALE); imagefilter($image, IMG_FILTER_COLORIZE, 19, 18, 0); imagefilter($image, IMG_FILTER_BRIGHTNESS, -10); imagefilter($image, IMG_FILTER_CONTRAST, -2); imagejpeg($image, 'myimage.jpg'); // overwrites the original file. Thanks!
  4. I have an image field with setting 'Maximum files allowed' set to 1 (in case that's relevant). I drop an image in it and save and then use that image in a textarea field when editing copy (with TinyMCE if relevant). But is there a neat way to replace such an image for a new version? Right now I am dropping in a new image and saving except then the textarea shows a placeholder space not the image which makes sense as the original is gone but if I select the placeholder and click the image icon in the TinyMCE toolbar then I get an error (saying the image is gone) rather than an opportunity to choose the new version. I know I can delete the image placeholder in the copy and add the new one but then I loose stuff like any alignment or size settings. Anyone know if there is a neater way to perform the replacement of images?
  5. I'm trying to plan out a portfolio site that gives me some room to grow. I've read a lot of questions and answers on the forums regarding how to set up images for portfolio sites. Which method is the most future-proof: adding images to a page with the image field, adding images to a page using repeater fields for extra data (a proper title, tags, etc.), or giving each image its own child page and adding fields to hold any extra data? They each have their pros and cons; which method would the ProcessWire veterans recommend? Ryan linked this site on twitter: http://www.villasofdistinction.com/. He mentioned it had ~30k photos. Ryan, what method did you use? Thanks!
  6. Hello, Very simple question. PW lets you add the title field which will appear in the title tab once the web is open. I would like to insert an image/icon on the left side as many other webs. Is there a way to place this via CMS or should I hardcode it? Please let me know how I can do this. Thank you very much!
  7. Hope anyone can help me out, searched the forum for similar problems but.... Uploading an image results in an error (unable to move the uploaded file .... ), safe_mode is off, upload_tmp_dir is set in the php.ini If I open up the related folder the files are uploaded and in de page folder, but have only read/write access for the user (rw-------). Anyone?
  8. Good evening again, the problem I face today is a bit tougher than the last one. This is my situation: I have multiple pages which represent photo-albums (/photos/summer, /photos/vacation-2012, ...) - Now I want to create a page "My favorite photos". So inside my photo-albums I'd like to mark single uploaded photos (standard image-field) as a "favorite photo" with a checkbox - The marked photos shall appear inside my "My favorite photos" page. When editing the "My favorite photos" page I'd like to see all selected "favorite" photos and be able to sort them (just like in standard the image-field) - When deleting a "favorite" photo from "My favorite photo" page, the checkbox of the original photo (in it's original album) shall be unchecked. So -as a PW beginner- I'm afraid I have to create an own module for this functionality (or at least fork the existing image-field and modify it)... Any tips or "best practices" for my idea? I took a look at the PW structure and it appears I'll have to copy the images from my various albums to the "favorite photo" page - Also I will have to populate the image-field via API... Any ideas or suggestions?
  9. In a template, I'm drawing a 4x3 table that I want to display images from other pages selected from page fields inside a repeater on this page. Their position relative to each other is important, and most of the space in the table will usually be intentionally empty, which is why I'm doing it in this rather strange way: In the admin, the referenced page's image's position in the table is chosen from page selects with columns and rows defined in /global/matrix/rows/ and /global/matrix/cols/. In the template, we get the images by iterating through the table and seeing if any of the "ingredient" items on this page match the the coordinates of the current table cell. If what I've described here sounds confusing, it's confusing me, too. Here's my loop: foreach ($pages->get("/global/matrix/rows/")->children as $row) { echo '<tr>'; foreach ($pages->get("/global/matrix/cols/")->children as $col) { $tdobject = $page->ingredients->find("m_row=$row, m_col=$col")->first()->ingredient; echo '<td><img src="'. $tdobject->icon->size(40, 40)->url . '"/></td>'; // line that throws the error } echo '</tr>'; } This gets me: Error Call to a member function size() on a non-object However, changing that line to this works: echo '<td><img src="'. $tdobject->icon->url . '"/></td>'; So I can pull a URL from the image object on the referenced page, but I can't call size() on it. What am I missing?
  10. At some point with all of my projects, the client will ask for an image to be replaced. But the image description rarely needs to be updated when the image is replaced. (For example, the client may wish for the image to be cropped in a different way.) Unfortunately, when replacing an image in PW, the description is deleted. If the client isn't aware that it will be deleted, it leads to frustrated clients and missing data. And if a large number of images need to be replaced, it is cumbersome to copy the description and paste it back into the field when the image is replaced. In a future version of PW, I've love to see the description remain untouched when an image is replaced.
  11. Hello together, is there any known bug with Safari (on Mac) and the HTML5 image uploading? Somehow the "drag'n'drop" feature does not work properly - The "drag and drop files in here" text does not appear at the bottom - So I guess it's switched off completely? No problems with firefox and chrome by the way Oh and thanks a lot for this really great CMS! I recently launched sn4ke.de
  12. Hello everyone, I'm new to Process Wire and I'm trying to set up a website for a magazine. My first task was to import a bunch of videos from another site into PW and it actually worked out quite good. Now I've got a bunch of pages with an external image reference in the image field. My idea was *not* to copy the whole lot of images, but to download and resize the ones that are requested. The first naiive attempt was this: <img src="<?=$article->video_image->size(350,88)->url; ?>"> With 'video_image' being a full path to an image on another remote server. Soo ... that didn't work. Do I need to copy the image to my server before resizing it? Or is there a trick to resize it and save only the "new" image on my server? Thanks for any help! Loving PW so far! thomas
  13. Am running into a problem where it seems using the ->size() method, my images are squeezing to fit rather than cropping. I though images would crop so as to maintain their ratio? Or perhaps it's too early on a Sunday morning to be looking at code Here is what I have: <!-- Main image --> <?php $main = $page->main_image->size(920,250); ?> <img src="<?php echo $main->url; ?>" alt="<?php echo $page->title; ?>" width="<?php echo $main->width; ?>" height="<?php echo $main->height; ?>" class="small_frame" id="main_image" /> <!-- Thumbnails --> <?php if ($page->images !="") { ?> <div id="thumbs"> <?php $images = $page->images; foreach ($images as $image) { $class = "thumb small_frame"; $thumb = $image->size(160,60); ?> <img src="<?php echo $image->url; ?>" alt="<?php echo $page->title; ?>" width="<?php echo $thumb->width; ?>" height="<?php echo $thumb->height; ?>" class="<?php echo $class; ?>" /> <?php } ?>
  14. Are images that are uploaded to a page assigned a unique id number?
  15. I'm having a real issue here guys, my site's just gone live and the client has been adding some photos to the galleries. All looked great until I got further down and some of the images had not been resized (so were showing 3900px x 3000px or something similarly terrifying). All the images are just in a foreach loop and the vast majority of the images are getting correctly resized but once one is not resized, all subsequent ones follow suit and are also not resized. I can upload code, but has anyone else seen or heard of a similar issue? Sorry for the desperation but it's sort of making the website look insane
  16. I'm building a little photography portfolio site and I'm running into a question with image->size(). For most applications, the sizing to fit and center-crop is great, but for this site, I want to have a maximum width and maximum height, so that if the photo is narrower than the specified size, it gets smaller and has space on the sides, and if it's shorter, it gets space on the top and bottom. In other words, I'm looking to size the image such that it never gets cropped; you see the whole image even if it means making it smaller. Is there a way to do that with size()?
×
×
  • Create New...