diff --git a/picture.module b/picture.module
index 523b24c..642c146 100644
--- a/picture.module
+++ b/picture.module
@@ -935,3 +935,136 @@ function picture_file_formatter_picture_settings($form, &$form_state, $settings)
 
   return $element;
 }
+
+/**
+ * Implements hook_filter_info()
+ */
+function picture_filter_info() {
+  $filters = array();
+  $filters['picture'] = array(
+    'title' => t('Make images responsive with the picture module'),
+    'description' => t('Replace img tags with markup that contains media width
+    breakpoints. The appropriate image file size will be chosen.'),
+    'process callback' => '_picture_filter_process',
+    'tips callback' => '_picture_filter_tips',
+    //@TODO remove following cache line when development is finished.
+    'cache' => FALSE,
+    );
+
+  return $filters;
+}
+
+/**
+ * Process callback for inline image filter
+ */
+function _picture_filter_process($text, $filter) {
+
+  // create DOM object. A consequence of using DOM is that HTML will be
+  // corrected, which normally is a selectable filter. In other words, using
+  // this filter is the same as using this filter and the Drupal
+  // "Correct faulty and chopped off HTML" together.
+  $dom_document = filter_dom_load($text);
+  $xpath = new DOMXpath($dom_document);
+  $images = $xpath->query('//img[@data-picture-group]');
+  foreach ($images as $image) {
+    // create the render array expected by theme_picture_formatter
+    $image_render_array = _picture_filter_prepare_image($image);
+
+    // get the responsive markup for this image
+    $new_markup = theme('picture_formatter', $image_render_array);
+
+    //replace the original img tag with the responsive markup
+    $new_dom = filter_dom_load($new_markup);
+    $new_node = $new_dom->getElementsByTagName('body');
+    $import = $dom_document->importNode($new_node->item(0), TRUE);
+    $image->parentNode->replaceChild($import, $image);
+  }
+  // turn the DOMDocument back into HTML
+  $text = filter_dom_serialize($dom_document);
+  return $text;
+}
+
+/**
+ * Prepare a Render Array for theme_picture_formatter(...)
+ * similar to picture_field_formatter_picture_view(...)
+ * with modifications for inline images
+ *
+ * @param $image
+ * A DOMNode corresponding to the img tag
+ */
+function _picture_filter_prepare_image($image) {
+  $image_render_array = array();
+  $breakpoint_styles = array();
+  $fallback_image_style = '';
+  $group_name = $image->getAttribute('data-picture-group');
+  $mappings = picture_mapping_load($group_name);
+
+  if ($mappings) {
+    foreach ($mappings->mapping as $breakpoint_name => $multipliers) {
+      if (!empty($multipliers)) {
+        foreach ($multipliers as $multiplier => $image_style) {
+          if (!empty($image_style)) {
+            if (empty($fallback_image_style)) {
+              $fallback_image_style = $image_style;
+            }
+            if (!isset($breakpoint_styles[$breakpoint_name])) {
+              $breakpoint_styles[$breakpoint_name] = array();
+            }
+            $breakpoint_styles[$breakpoint_name][$multiplier] = $image_style;
+          }
+        }
+      }
+    }
+  }
+
+  //@TODO create filter settings page to configure fallback style per
+  // picture group
+
+  // figure out the schema for the file since theme_picture expects
+  // a file uri, not the root relative path
+  // @TODO Please review this:
+  // I'm not sure how to get a 'uri' with a 'schema' (public or private...)
+  // knowing just the drupal root relative file path.
+  // This currently will work only with public files.
+  $file_root_relative = $image->getAttribute('src');
+  $public_path = variable_get('file_public_path', conf_path() . '/files');
+  $uri = 'public://' . str_replace($public_path, '', $file_root_relative);
+  $uri = file_stream_wrapper_uri_normalize($uri);
+  $image_info = image_get_info($uri);
+  $height = $image_info['height'];
+  $width = $image_info['width'];
+  $image_render_array = array(
+    '#theme' => 'picture_formatter',
+    '#attached' => array('library' => array(
+      array('picture', 'matchmedia'),
+      array('picture', 'picturefill'),
+      array('picture', 'picture.ajax'),
+    )),
+    '#item' => array(
+      //@TODO adjust fallback
+      'style_name' => 'thumbnail',
+      'uri' => $uri,
+      'width' => $width,
+      'height' => $height,
+      'alt' => $image->getAttribute('alt'),
+      'title' => $image->getAttribute('title'),
+      'filemime' => $image_info['mime_type'],
+    ),
+    //TODO adjust fallback
+    '#image_style' => 'thumbnail',
+    '#breakpoints' => $breakpoint_styles,
+    '#path' => '',
+  );
+
+  return $image_render_array;
+  
+}
+/**
+ * Implements picture filter tips callback.
+ */
+function _picture_filter_tips($filter, $format, $long = FALSE) {
+  $tips = 'images will be responsive, with a file size appropriate for the
+    browser width. This functions only for local public files.';
+
+  return $tips;
+}
