Need to replace the user_picture with my own field_profile_picture(since i've provided a nice crop with imagefield crop).   I've succeeded in getting the file path using template_preprocess_user_picture and the code   function theme_preprocess_user_picture(&amp;$variables) {             $account = user_load($variables['account']-&gt;uid);     if(isset($account-&gt;field_profile_picture['und'][0]['uri'])) {         $variables['user_picture'] = $account-&gt;field_profile_picture['und'][0]['uri'];   the user_picture is getting replaced by the file path.... how to render the image???  Anyone Please....
121593
Because my site requires user pictures to be approved, the default Drupal user picture is not suitable.  Instead, I want to show a picture from a field in each user's profile as the user's profile picture.  The field is "field_profile_picture".  The image style is "profile_picture".  Based on , I put the following code in user-picture.tpl.php in my theme's templates folder:  if (!empty($user-&gt;field_profile_picture['und'][0]['filename'])) {   echo theme('image_style', array('style_name' =&gt; 'profile_pic', 'path' =&gt; file_build_uri($user-&gt;field_profile_picture['und'][0]['filename']))); }   This doesn't result in any PHP errors but no picture is displayed.  It appears that field_acc_profile_picture is evaluating as empty because even if I put a print "Hello world"; inside the {} it doesn't appear.  However, I am sure that the field has a value because I can see the picture displayed in views.
72512
I'm wondering what information is contained in an image file like JPEG or PNG.  I know that most of them contain a metadata file, but anything else other than that?  Anything relates to the license key or personal information in there?  Does software like Photoshop hide some user data in an image?
64931
I have a user, say user1, which has modifications to its .bash_profile, one of them changing the PATH, e.g.: export PATH=/some/place:$PATH. This change works fine if I log on as user1 or do a su - user1.  But if I try to run a command via su as root, e.g.:  su -c test.sh oracle   (test contains echo $PATH)  It doesn't seem to have the modified PATH (or root's PATH, for that matter). I've also tried copying .bash_profile to .profile, to no avail.   Why is this happening?
22745
Trying to learn more about creating my own themes and not using any plugins I wanted an ability to display all the images in a post excluding the thumbnail in my single-foobar.php file and I can do that with:  &lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post();      $thumb_ID = get_post_thumbnail_id( $post-&gt;ID );  $args = array(    'post_type' =&gt; 'attachment',    'numberposts' =&gt; -1,    'post_status' =&gt; null,    'post_parent' =&gt; $post-&gt;ID,    'exclude' =&gt; $thumb_ID   );  $attachments = get_posts( $args );  if ( $attachments ) {     foreach ( $attachments as $attachment ) {        echo '&lt;div class="portproject"&gt;';        $image_res = wp_get_attachment_image( $attachment-&gt;ID, ' img-responsive' );        echo $image_res;        echo '&lt;/div&gt;';       }  }  else { ?&gt;     &lt;span&gt; No pictures loaded at this time&lt;/span&gt;  &lt;?php } endwhile; endif; ?&gt;   However, when I apply my static HTML and then try to call get_the_content() with:  &lt;?php  $content = get_the_content(); $content = preg_replace("/&lt;img[^&gt;]+\&gt;/i", "(image) ", $content);           $content = apply_filters('the_content', $content); $content = str_replace(']]&gt;', ']]&gt;', $content); echo $content; ?&gt;   it removes the images but leaves a (image) in the post with spaces then displays the remaining text. I did find a similar  but it suggests using get_the_content() but that strips all the styling from the post.  So my question is how can I strip images from the_content()?  I did find "" from my searches but that still uses the get_the_content() approach.
61504
I am looking for a way to take a user uploaded image that is currently put in a temporary location ex: /tmp/jkhjkh78 and create a php image from it, autodetecting the format.  Is there a more clever way to do this than a bunch of try/catching with imagefromjpeg, imagefrompng, etc?
71165
I don’t know if this is a bug or is this how the images work, hosted on imgur. It basically adds a query string. I added a profile pic as gif but it doesn’t work as how gif images work. If I goto the image url it works fine.  My Profile:   Image URL on profile:   Actual animated image Url without Query String (working):   Is this how images hosted on imgur work or is this something else?
6328
Is there a way to hide the field label when rendering a custom field in Drupal 7?  In my node template I have:  &lt;?php print render($content['field_image']); ?&gt;   Which gives me:  &lt;div class="field field-name-field-image field-type-image field-label-above"&gt;   &lt;div class="field-label"&gt;Image:&amp;nbsp;&lt;/div&gt;   &lt;div class="field-items"&gt;     &lt;div class="field-item even"&gt;       &lt;img typeof="foaf:Image" src="http://site.com/sites/default/files/image.jpg" alt=""&gt;     &lt;/div&gt;   &lt;/div&gt; &lt;/div&gt;   I'd like to not have the &lt;div class="field-label"&gt;Image:&amp;nbsp;&lt;/div&gt;.  Is there a way to get rid of this other than in the CSS or manually creating the markup?   I've tried unset($content['field_image']['#title']), but that gives me &lt;div class="field-label"&gt;:&amp;nbsp;&lt;/div&gt;.
75624
I have a question about getting a path to an image in a Twig template. The image is not assigned to a field or something. Just a static image which is stored in "MYTHEME/image/icon/my-icon.png".  In Drupal 7 I get the path in my node.template with the following code:  &lt;img src="&lt;?php print base_path() . path_to_theme(); ?&gt;/image/icons"&gt;/my-icon.png   How does it work with in Drupal 8? I tried to pass a variable in template_preprocess_node().  MYTHEME.theme:  $variables['images_path'] = \Drupal::theme()-&gt;getActiveTheme()-&gt;getPath() . '/image/';   Twig template:  &lt;img src="{{ images_path  ~ 'icons/' ~ 'my-icon.png' }}"&gt;   It doesn't work. There is no PHP error, but the path is wrongly said to be .
1320
Is there a name for the default avatars that are generated for users who do not assign one themselves? Not the avatar of the blank user, but the one made up of shards, shapes, and colours:      Is there an online generator for something like that? See also:
67476
I recently updated my profile bio (from Arqade) and clicked 'Save and copy changes to all public communities'. This appears to have broken/reset my profile picture on all but Arqade. Note that I did not update my profile picture as part of my changes. Arqade:  Meta SE for comparison:  I haven't touched my profile picture in years. Is this a bug?  Update: It appears my profile pic across all communities has been set back to 'Identicon'. I went on to Stack Overflow and changed my profile picture back to 'Gravitar' and clicked 'Save and copy to all communities' again, but this did not update my profile picture anywhere but SO. (I did the same on Sustainability to be doubly sure). Update 2: This is a persistent bug - I had changed most of my SE communities back to my 'Robotnik' display pic over the past little while. Today I edited my profile again on Arqade, Clicked 'Save and copy' - and the display pic reverted back to identicon again across all sites. Update 3: I have re-uploaded my profile picture and the 'Save and copy' function worked. It appears that this is actually a bug to do with the old images from Gravatar.
76907
I am having some issues with the  type. Whenever I try to edit and save a form that has a managed_file element in it an error occurs: The file  used in the Picture field may not be referenced.  This is the code I'm using:  function foo_form ($form, &amp;$form_state, $foo) {     ...        $form['file'] = array(     '#type' =&gt; 'managed_file',     '#title' =&gt; t('Picture'),     '#default_value' =&gt; (isset($foo-&gt;file-&gt;fid) ? $banner-&gt;foo-&gt;fid : ''),     '#upload_location' =&gt; variable_get('foo_upload_location'),   );    if (isset($foo-&gt;file)) {     $form['current_file'] = array(       '#type' =&gt; 'hidden',       '#value' =&gt; $foo-&gt;file-&gt;fid,     );   }   ...   $form['submit'] = array(     '#type' =&gt; 'submit',     '#value' =&gt; t('Save'),   );   return $form;  }  function foo_form_submit ($form, &amp;$form_state) {   $foo = (object)$form_state['values'];    $current_file_set = isset($form_state['values']['current_file']);    if ($form_state['values']['file'] != 0 &amp;&amp; !$current_file_set) {     // Load the file uploaded in the form.     $file = file_load($form_state['values']['file']);      $file-&gt;status = FILE_STATUS_PERMANENT;      file_save($file);      $foo-&gt;file = $file-&gt;fid;   } else if ($form_state['values']['file'] != 0 &amp;&amp; $current_file_set) {      // If we are uploading a different picture, delete the old one and save the     // new one. If not, don't do anything.     if ($form_state['values']['current_file'] != $form_state['values']['file']) {       file_delete(file_load($form_state['values']['current_file']));       // Load the file uploaded in the form.       $file = file_load($form_state['values']['file']);        $file-&gt;status = FILE_STATUS_PERMANENT;        file_save($file);        $foo-&gt;file = $file-&gt;fid;     }   } else {     file_delete(file_load($form_state['values']['current_file']));     $foo-&gt;file = null;   }    ... }   I traced the error back to the  function in modules/file/file.module but don't know anything about the file references.
29780
I am trying to convert a bunch of images to thumbnails that might be in several subdirectories, and save a copy of the image as a thumbnail inside the subdirectory, but I can't figure out the syntax. Any advice would be welcome.   convert test/*/*.jpg -50x50 test/*/*_thumb.jpg
69575
In Drupal 7, is there a way to add more fields to the registration process? I was thinking along the lines of birthday, fullname, gender, twitter, etc. Also how do I access this data once it's in, so I can output it to my template files?
98618
How do I load an image from a taxonomy custom field into a custom location on the taxonomy page template?  It's easy to accomplish it when the image is in a node. The following code works for images, but it doesn't work for taxonomy pages.      {{ file_url(node.field_reference_background.entity.uri.value) }}   How can I accomplish the same for taxonomy pages?
56460
Currently i am unable to create images that get resized automaticaly according to the different image styles.  This includes the default styles such as thumbnail as well as the custom created styles.  I have checked the "Public file system path" as well as the "Temporary directory" (under Configuration > File system).  Both of the directories exist.  The file permissions are good on the directories (777).  The original file that's uploaded gets created. It's just the scaled images that aren't getting created.  Any help with this problem would be very welcome. If there is already a solution somewhere (which means i searched for the wrong terms), a link to that would be very appreciated.  edit:   I can't find anything in the logfile either, except for messages like :  type : page not found  message: sites/default/files/styles/thumbnail/public/fotoslider/slider_images/testbeeld20130103005.jpg
106660
What's the best way to extend the User model (bundled with Django's authentication app) with custom fields? I would also possibly like to use the email as the username (for authentication purposes).  I've already seen a   to do it, but can't decide on which one is the best.
74075
In Mac OS, when you have your login screen configured to show a list of users (as opposed to a username/password text box combo), each user is accompanied by a large circular image.  This is alternately known as a 'User Picture' or a 'Login Picture'.  All users have such an image even if they are the generic gray silhouette image.  Furthermore, when you enable network users to log into your mac, and have the login screen configured to show a list of users, the User Pic that accompanies the 'Other...' user is a special login picture, which is a gray silhouette of three individuals, like so:    I would like to change this image so that I can have a more fun picture for the students in my school to click on when they want to login with their network account.  I do not know how to do this.  One idea I had, and it was admittedly something of a brute force idea, was to find that image on the hard drive and replace it with a picture of my choice.  The image seems to be this one:  /System/Library/CoreServices/CoreTypes.bundle/Content/Resources/Everyone.icns   However, overwriting that file with a normal image had no effect on the login screen, so I am thinking that either, 1. that isn't really the file being used, or 2. it is the correct file but something else needs to change in addition to over writing it with a different image.  To clarify: I am solid on changing the user picture for normal users and I have a script in place already to do so. I do not need help with that.  It is the 'Everyone' image, or the gray silhouette of three heads, that accompanies the 'Other...' prompt on the login screen that I would like to change.  The "Bounty Goal" is to replace the 'everyone' image on the login screen with one of my choosing.  This is not the same thing as providing a login pic for an individual who has signed in by clicking on the Other link.  Thanks in advance for solving this!!